mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Auto merge of #9763 - Tangresh:i9725, r=nox
Implement value for DOMTokenList Fixes #9725 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9763) <!-- Reviewable:end -->
This commit is contained in:
commit
00628704ca
7 changed files with 44 additions and 15 deletions
|
@ -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)
|
||||
|
|
|
@ -19,5 +19,8 @@ interface DOMTokenList {
|
|||
[Throws]
|
||||
boolean toggle(DOMString token, optional boolean force);
|
||||
|
||||
[Pure]
|
||||
attribute DOMString value;
|
||||
|
||||
stringifier;
|
||||
};
|
||||
|
|
|
@ -28,7 +28,7 @@ interface Element : Node {
|
|||
attribute DOMString id;
|
||||
[Pure]
|
||||
attribute DOMString className;
|
||||
[SameObject]
|
||||
[SameObject, PutForwards=value]
|
||||
readonly attribute DOMTokenList classList;
|
||||
|
||||
[SameObject]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue