servo: Merge #4050 - Implements Attr#nodeValue (from mttr:implement_attr_nodevalue); r=Ms2ger

Fixes #4047, and updates to expect tests that are now passing because of it.

Source-Repo: https://github.com/servo/servo
Source-Revision: c23bfdf1c52cdd42c37cd931525c23e22f1d289f
This commit is contained in:
Matthew Rasmus 2014-11-20 17:18:29 -07:00
parent e76f75ceeb
commit bca98837ef
2 changed files with 9 additions and 0 deletions

View File

@ -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()
}

View File

@ -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;