diff options
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/domtokenlist.rs | 10 | ||||
-rw-r--r-- | components/script/dom/webidls/DOMTokenList.webidl | 3 | ||||
-rw-r--r-- | components/script/dom/webidls/Element.webidl | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/components/script/dom/domtokenlist.rs b/components/script/dom/domtokenlist.rs index fd1644f17c7..f74887d0899 100644 --- a/components/script/dom/domtokenlist.rs +++ b/components/script/dom/domtokenlist.rs @@ -129,6 +129,16 @@ impl DOMTokenListMethods for DOMTokenList { } } + // https://dom.spec.whatwg.org/#dom-domtokenlist-value + fn Value(&self) -> DOMString { + self.element.get_string_attribute(&self.local_name) + } + + // https://dom.spec.whatwg.org/#dom-domtokenlist-value + fn SetValue(&self, value: DOMString) { + self.element.set_tokenlist_attribute(&self.local_name, value); + } + // https://dom.spec.whatwg.org/#concept-dtl-serialize fn Stringifier(&self) -> DOMString { self.element.get_string_attribute(&self.local_name) diff --git a/components/script/dom/webidls/DOMTokenList.webidl b/components/script/dom/webidls/DOMTokenList.webidl index 746bc8ac521..c9125285f74 100644 --- a/components/script/dom/webidls/DOMTokenList.webidl +++ b/components/script/dom/webidls/DOMTokenList.webidl @@ -19,5 +19,8 @@ interface DOMTokenList { [Throws] boolean toggle(DOMString token, optional boolean force); + [Pure] + attribute DOMString value; + stringifier; }; diff --git a/components/script/dom/webidls/Element.webidl b/components/script/dom/webidls/Element.webidl index 009fb999856..900c2eb24dc 100644 --- a/components/script/dom/webidls/Element.webidl +++ b/components/script/dom/webidls/Element.webidl @@ -28,7 +28,7 @@ interface Element : Node { attribute DOMString id; [Pure] attribute DOMString className; - [SameObject] + [SameObject, PutForwards=value] readonly attribute DOMTokenList classList; [SameObject] |