diff options
Diffstat (limited to 'components/script/dom/webidls')
9 files changed, 80 insertions, 67 deletions
diff --git a/components/script/dom/webidls/HTMLAnchorElement.webidl b/components/script/dom/webidls/HTMLAnchorElement.webidl index f21e3dc6af7..6585e1ccc56 100644 --- a/components/script/dom/webidls/HTMLAnchorElement.webidl +++ b/components/script/dom/webidls/HTMLAnchorElement.webidl @@ -26,7 +26,7 @@ interface HTMLAnchorElement : HTMLElement { // also has obsolete members }; -//HTMLAnchorElement implements URLUtils; +//HTMLAnchorElement implements HTMLHyperlinkElementUtils; // https://html.spec.whatwg.org/multipage/#HTMLAnchorElement-partial partial interface HTMLAnchorElement { diff --git a/components/script/dom/webidls/HTMLAreaElement.webidl b/components/script/dom/webidls/HTMLAreaElement.webidl index 860e9af008a..a6568bd0b6b 100644 --- a/components/script/dom/webidls/HTMLAreaElement.webidl +++ b/components/script/dom/webidls/HTMLAreaElement.webidl @@ -13,12 +13,9 @@ interface HTMLAreaElement : HTMLElement { //[PutForwards=value] attribute DOMSettableTokenList ping; // attribute DOMString rel; readonly attribute DOMTokenList relList; - // attribute DOMString hreflang; - // attribute DOMString type; - - // also has obsolete members + // hreflang and type are not reflected }; -//HTMLAreaElement implements URLUtils; +//HTMLAreaElement implements HTMLHyperlinkElementUtils; // https://html.spec.whatwg.org/multipage/#HTMLAreaElement-partial partial interface HTMLAreaElement { diff --git a/components/script/dom/webidls/HTMLHyperlinkElementUtils.webidl b/components/script/dom/webidls/HTMLHyperlinkElementUtils.webidl new file mode 100644 index 00000000000..c8d7a35493d --- /dev/null +++ b/components/script/dom/webidls/HTMLHyperlinkElementUtils.webidl @@ -0,0 +1,20 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// https://html.spec.whatwg.org/multipage/#htmlhyperlinkelementutils +//[NoInterfaceObject/*, Exposed=Window*/] +//interface HTMLHyperlinkElementUtils { +// stringifier attribute USVString href; +// attribute USVString origin; +// attribute USVString protocol; +// attribute USVString username; +// attribute USVString password; +// attribute USVString host; +// attribute USVString hostname; +// attribute USVString port; +// attribute USVString pathname; +// attribute USVString search; +// attribute USVString hash; +//}; diff --git a/components/script/dom/webidls/Location.webidl b/components/script/dom/webidls/Location.webidl index 70b496b00ec..f82031ac74b 100644 --- a/components/script/dom/webidls/Location.webidl +++ b/components/script/dom/webidls/Location.webidl @@ -5,8 +5,24 @@ // https://html.spec.whatwg.org/multipage/#location /*[Unforgeable]*/ interface Location { - void assign(DOMString url); - //void replace(DOMString url); + /*stringifier*/ attribute USVString href; + // attribute USVString origin; + attribute USVString protocol; + attribute USVString host; + attribute USVString hostname; + attribute USVString port; + attribute USVString pathname; + attribute USVString search; + attribute USVString hash; + + void assign(USVString url); + //void replace(USVString url); void reload(); + + //[SameObject] readonly attribute USVString[] ancestorOrigins; + + // This is only doing as well as gecko right now. + // https://github.com/servo/servo/issues/7590 is on file for + // adding attribute stringifier support. + stringifier; }; -Location implements URLUtils; diff --git a/components/script/dom/webidls/URL.webidl b/components/script/dom/webidls/URL.webidl index 2e03ea9b858..57ae34a3eba 100644 --- a/components/script/dom/webidls/URL.webidl +++ b/components/script/dom/webidls/URL.webidl @@ -8,5 +8,23 @@ interface URL { static USVString domainToASCII(USVString domain); // static USVString domainToUnicode(USVString domain); + + [SetterThrows] + /*stringifier*/ attribute USVString href; + // readonly attribute USVString origin; + attribute USVString protocol; + attribute USVString username; + attribute USVString password; + attribute USVString host; + attribute USVString hostname; + attribute USVString port; + attribute USVString pathname; + attribute USVString search; + // readonly attribute URLSearchParams searchParams; + attribute USVString hash; + + // This is only doing as well as gecko right now. + // https://github.com/servo/servo/issues/7590 is on file for + // adding attribute stringifier support. + stringifier; }; -URL implements URLUtils; diff --git a/components/script/dom/webidls/URLSearchParams.webidl b/components/script/dom/webidls/URLSearchParams.webidl index 1afdc30a352..4ab1cd43019 100644 --- a/components/script/dom/webidls/URLSearchParams.webidl +++ b/components/script/dom/webidls/URLSearchParams.webidl @@ -7,7 +7,7 @@ * https://url.spec.whatwg.org/#interface-urlsearchparams */ -[Constructor(optional (DOMString or URLSearchParams) init)] +[Constructor(optional (DOMString or URLSearchParams) init/* = ""*/)] interface URLSearchParams { void append(DOMString name, DOMString value); void delete(DOMString name); @@ -15,5 +15,7 @@ interface URLSearchParams { // sequence<DOMString> getAll(DOMString name); boolean has(DOMString name); void set(DOMString name, DOMString value); + // iterable<USVString, USVString>; stringifier; }; + diff --git a/components/script/dom/webidls/URLUtils.webidl b/components/script/dom/webidls/URLUtils.webidl deleted file mode 100644 index bb32fb82e5e..00000000000 --- a/components/script/dom/webidls/URLUtils.webidl +++ /dev/null @@ -1,28 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -// https://url.spec.whatwg.org/#urlutils -[NoInterfaceObject] -interface URLUtils { - //stringifier attribute USVString href; - [SetterThrows] - attribute USVString href; - //readonly attribute USVString origin; - attribute USVString protocol; - attribute USVString username; - attribute USVString password; - attribute USVString host; - attribute USVString hostname; - attribute USVString port; - attribute USVString pathname; - attribute USVString search; - // attribute URLSearchParams searchParams; - attribute USVString hash; - - // This is only doing as well as gecko right now. - // https://github.com/servo/servo/issues/7590 is on file for - // adding attribute stringifier support. - stringifier; -}; diff --git a/components/script/dom/webidls/URLUtilsReadOnly.webidl b/components/script/dom/webidls/URLUtilsReadOnly.webidl deleted file mode 100644 index a919986bbbe..00000000000 --- a/components/script/dom/webidls/URLUtilsReadOnly.webidl +++ /dev/null @@ -1,26 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -// https://url.spec.whatwg.org/#urlutilsreadonly -[NoInterfaceObject/*, - Exposed=(Window,Worker)*/] -interface URLUtilsReadOnly { - //stringifier readonly attribute USVString href; - readonly attribute USVString href; - //readonly attribute USVString origin; - - readonly attribute USVString protocol; - readonly attribute USVString host; - readonly attribute USVString hostname; - readonly attribute USVString port; - readonly attribute USVString pathname; - readonly attribute USVString search; - readonly attribute USVString hash; - - // This is only doing as well as gecko right now. - // https://github.com/servo/servo/issues/7590 is on file for - // adding attribute stringifier support. - stringifier; -}; diff --git a/components/script/dom/webidls/WorkerLocation.webidl b/components/script/dom/webidls/WorkerLocation.webidl index 7d624118271..598e210de44 100644 --- a/components/script/dom/webidls/WorkerLocation.webidl +++ b/components/script/dom/webidls/WorkerLocation.webidl @@ -5,5 +5,19 @@ // https://html.spec.whatwg.org/multipage/#worker-locations //[Exposed=Worker] -interface WorkerLocation { }; -WorkerLocation implements URLUtilsReadOnly; +interface WorkerLocation { + /*stringifier*/ readonly attribute USVString href; + // readonly attribute USVString origin; + readonly attribute USVString protocol; + readonly attribute USVString host; + readonly attribute USVString hostname; + readonly attribute USVString port; + readonly attribute USVString pathname; + readonly attribute USVString search; + readonly attribute USVString hash; + + // This is only doing as well as gecko right now. + // https://github.com/servo/servo/issues/7590 is on file for + // adding attribute stringifier support. + stringifier; +}; |