Support stringifier attributes

This commit is contained in:
Kagami Sascha Rosylight 2019-10-25 15:46:52 +09:00
parent 97c01fc479
commit 691af0e98b
14 changed files with 11 additions and 73 deletions

View file

@ -22,8 +22,7 @@ interface DOMTokenList {
void replace(DOMString token, DOMString newToken);
[CEReactions, Pure]
attribute DOMString value;
stringifier attribute DOMString value;
stringifier;
iterable<DOMString?>;
};

View file

@ -4,10 +4,8 @@
// https://html.spec.whatwg.org/multipage/#htmlhyperlinkelementutils
interface mixin HTMLHyperlinkElementUtils {
// [CEReactions]
// stringifier attribute USVString href;
[CEReactions]
attribute USVString href;
stringifier attribute USVString href;
readonly attribute USVString origin;
[CEReactions]
attribute USVString protocol;
@ -27,9 +25,4 @@ interface mixin HTMLHyperlinkElementUtils {
attribute USVString search;
[CEReactions]
attribute USVString hash;
// Adding a separate stringifier method until
// https://github.com/servo/servo/issues/7590 adds attribute stringifier
// support.
stringifier;
};

View file

@ -4,7 +4,7 @@
// https://html.spec.whatwg.org/multipage/#location
[Exposed=Window, Unforgeable] interface Location {
/*stringifier*/ [Throws] attribute USVString href;
[Throws] stringifier attribute USVString href;
[Throws] readonly attribute USVString origin;
[Throws] attribute USVString protocol;
[Throws] attribute USVString host;
@ -19,9 +19,4 @@
[Throws] 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.
[Throws] stringifier;
};

View file

@ -3,10 +3,9 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// https://drafts.csswg.org/cssom/#the-medialist-interface
// [LegacyArrayClass]
[Exposed=Window]
interface MediaList {
/* stringifier */ attribute [TreatNullAs=EmptyString] DOMString mediaText;
stringifier attribute [TreatNullAs=EmptyString] DOMString mediaText;
readonly attribute unsigned long length;
getter DOMString? item(unsigned long index);
void appendMedium(DOMString medium);

View file

@ -8,7 +8,7 @@
interface URL {
[Throws] constructor(USVString url, optional USVString base);
[SetterThrows]
/*stringifier*/ attribute USVString href;
stringifier attribute USVString href;
readonly attribute USVString origin;
attribute USVString protocol;
attribute USVString username;
@ -27,9 +27,4 @@ interface URL {
static void revokeObjectURL(DOMString url);
USVString toJSON();
// 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;
};

View file

@ -5,7 +5,7 @@
// https://html.spec.whatwg.org/multipage/#worker-locations
[Exposed=Worker]
interface WorkerLocation {
/*stringifier*/ readonly attribute USVString href;
stringifier readonly attribute USVString href;
readonly attribute USVString origin;
readonly attribute USVString protocol;
readonly attribute USVString host;
@ -14,9 +14,4 @@ interface WorkerLocation {
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;
};