mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement the whole Attr interface
This commit is contained in:
parent
23b75816a2
commit
96e42feaa1
4 changed files with 25 additions and 55 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue