Skip to content

DOMImplementation

Generated from idl/dom.webidl when the site was built at 7aa23e2.

DOMImplementation is an interface in idl/dom.webidl, exposed in Window. What it does is on MDN; this page says what niso has of it.

The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).

Feature On the web In niso Members
DOM Widely available No WPT tests WPT maps no test to it 4
operation native code only
[NisoNative, NewObject] Document? parseDocument(DOMString string, DOMString contentType, DOMString url, boolean errorDocument);
int32_t niso_dom_implementation_parse_document(niso_dom* dom, niso_handle self, const char* string, size_t string_len, const char* content_type, size_t content_type_len, const char* url, size_t url_len, bool error_document, niso_handle* out);

A new document at url with string parsed as contentType, a MIME type’s essence: HTML for “text/html”, with scripting disabled; XML for an XML MIME type (a TypeError for any other). XML that isn’t well-formed gives a document whose document element is a parsererror element, or null if errorDocument is false.

operation
[NewObject] DocumentType createDocumentType(DOMString name, DOMString publicId, DOMString systemId);
int32_t niso_dom_implementation_create_document_type(niso_dom* dom, niso_handle self, const char* name, size_t name_len, const char* public_id, size_t public_id_len, const char* system_id, size_t system_id_len, niso_handle* out);
operation
[NewObject] XMLDocument createDocument(DOMString? namespace, [LegacyNullToEmptyString] DOMString qualifiedName, optional DocumentType? doctype = null);
int32_t niso_dom_implementation_create_document(niso_dom* dom, niso_handle self, const char* namespace_, size_t namespace__len, const char* qualified_name, size_t qualified_name_len, niso_handle doctype, niso_handle* out);
operation
[NewObject] Document createHTMLDocument(optional DOMString title);
int32_t niso_dom_implementation_create_html_document(niso_dom* dom, niso_handle self, const char* title, size_t title_len, niso_handle* out);
operation
boolean hasFeature();
int32_t niso_dom_implementation_has_feature(niso_dom* dom, niso_handle self, bool* out);