diff --git a/components/script/dom/domimplementation.rs b/components/script/dom/domimplementation.rs index 6a871f992c2..a50f542690b 100644 --- a/components/script/dom/domimplementation.rs +++ b/components/script/dom/domimplementation.rs @@ -159,7 +159,7 @@ impl<'a> DOMImplementationMethods for JSRef<'a, DOMImplementation> { } // https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature - fn HasFeature(self, _feature: DOMString, _version: DOMString) -> bool { + fn HasFeature(self) -> bool { true } } diff --git a/components/script/dom/webidls/DOMImplementation.webidl b/components/script/dom/webidls/DOMImplementation.webidl index f74b6ea4bb8..a5c8c4392a7 100644 --- a/components/script/dom/webidls/DOMImplementation.webidl +++ b/components/script/dom/webidls/DOMImplementation.webidl @@ -4,22 +4,24 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. * * The origin of this IDL file is - * https://dom.spec.whatwg.org/#interface-domimplementation + * https://dom.spec.whatwg.org/#interface=domimplementation * * Copyright: * To the extent possible under law, the editors have waived all copyright and * related or neighboring rights to this work. */ +// [Exposed=Window] interface DOMImplementation { - boolean hasFeature(DOMString feature, - [TreatNullAs=EmptyString] DOMString version); - [Throws] + [NewObject, Throws] DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId); - [Throws] + [NewObject, Throws] Document createDocument(DOMString? namespace, [TreatNullAs=EmptyString] DOMString qualifiedName, optional DocumentType? doctype = null); + [NewObject] Document createHTMLDocument(optional DOMString title); + + boolean hasFeature(); // useless, always return true }; diff --git a/tests/wpt/metadata/dom/interfaces.html.ini b/tests/wpt/metadata/dom/interfaces.html.ini index 2c770617bf0..3abf7a55e5d 100644 --- a/tests/wpt/metadata/dom/interfaces.html.ini +++ b/tests/wpt/metadata/dom/interfaces.html.ini @@ -180,9 +180,6 @@ [DOMImplementation interface: operation createHTMLDocument(DOMString)] expected: FAIL - [DOMImplementation interface: operation hasFeature()] - expected: FAIL - [DocumentFragment interface: existence and properties of interface object] expected: FAIL