aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-03-01 08:34:21 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2016-03-01 08:34:21 +0530
commit00628704ca5f3318a4b97b7586cd17b31eabf5f6 (patch)
treecf7d06759b40c2bb6e3c4dd34a56f8923cda1cc8 /components
parentcd274a4a11ade6b0f17b96eb425472238698e12b (diff)
parentb29b2d6d7373337bd1601bb97275429684a77007 (diff)
downloadservo-00628704ca5f3318a4b97b7586cd17b31eabf5f6.tar.gz
servo-00628704ca5f3318a4b97b7586cd17b31eabf5f6.zip
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 -->
Diffstat (limited to 'components')
-rw-r--r--components/script/dom/domtokenlist.rs10
-rw-r--r--components/script/dom/webidls/DOMTokenList.webidl3
-rw-r--r--components/script/dom/webidls/Element.webidl2
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]