aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorMatthew Rasmus <mattr@zzntd.com>2014-11-20 12:52:47 -0800
committerMatthew Rasmus <mattr@zzntd.com>2014-11-20 13:18:10 -0800
commit73721cd1899e31c1684f9836724631a33584cf28 (patch)
treea8ce87d35f6aac2e0a94fce92c60041fd84baa4f /components/script
parent133b523d2b3a95796e66e77fe6962abf79c3a4c7 (diff)
downloadservo-73721cd1899e31c1684f9836724631a33584cf28.tar.gz
servo-73721cd1899e31c1684f9836724631a33584cf28.zip
Implement Attr#nodeValue
Fixes #4047
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/attr.rs8
-rw-r--r--components/script/dom/webidls/Attr.webidl1
2 files changed, 9 insertions, 0 deletions
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs
index 95e05f8e79d..79f82f37aef 100644
--- a/components/script/dom/attr.rs
+++ b/components/script/dom/attr.rs
@@ -152,6 +152,14 @@ impl<'a> AttrMethods for JSRef<'a, Attr> {
self.SetValue(value)
}
+ fn NodeValue(self) -> DOMString {
+ self.Value()
+ }
+
+ fn SetNodeValue(self, value: DOMString) {
+ self.SetValue(value)
+ }
+
fn Name(self) -> DOMString {
self.name.as_slice().to_string()
}
diff --git a/components/script/dom/webidls/Attr.webidl b/components/script/dom/webidls/Attr.webidl
index 3c7478c3851..356bc7ed26e 100644
--- a/components/script/dom/webidls/Attr.webidl
+++ b/components/script/dom/webidls/Attr.webidl
@@ -15,6 +15,7 @@ interface Attr {
readonly attribute DOMString name;
attribute DOMString value;
attribute DOMString textContent; // alias of .value
+ attribute DOMString nodeValue; // alias of .value
readonly attribute Element? ownerElement;