diff options
Diffstat (limited to 'components/script/dom/attr.rs')
-rw-r--r-- | components/script/dom/attr.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs index bbb7325a7ae..324d17d6e14 100644 --- a/components/script/dom/attr.rs +++ b/components/script/dom/attr.rs @@ -141,6 +141,14 @@ impl<'a> AttrMethods for JSRef<'a, Attr> { self.set_value(ReplacedAttr, value); } + fn TextContent(self) -> DOMString { + self.Value() + } + + fn SetTextContent(self, value: DOMString) { + self.SetValue(value) + } + fn Name(self) -> DOMString { self.name.as_slice().to_string() } @@ -156,6 +164,14 @@ impl<'a> AttrMethods for JSRef<'a, Attr> { fn GetPrefix(self) -> Option<DOMString> { self.prefix.clone() } + + fn GetOwnerElement(self) -> Option<Temporary<Element>> { + Some(Temporary::new(self.owner)) + } + + fn Specified(self) -> bool { + true // Always returns true + } } pub trait AttrHelpers<'a> { |