mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Introduce methods to simplify implementing reflecting attributes.
This commit is contained in:
parent
cb336a1831
commit
6e6d45ca26
2 changed files with 26 additions and 11 deletions
|
@ -7,9 +7,7 @@ use dom::bindings::utils::{DOMString, ErrorResult};
|
|||
use dom::document::AbstractDocument;
|
||||
use dom::element::HTMLScriptElementTypeId;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::namespace::Null;
|
||||
use dom::node::{AbstractNode, Node};
|
||||
use style::TElement;
|
||||
|
||||
pub struct HTMLScriptElement {
|
||||
htmlelement: HTMLElement,
|
||||
|
@ -30,10 +28,7 @@ impl HTMLScriptElement {
|
|||
|
||||
impl HTMLScriptElement {
|
||||
pub fn Src(&self) -> DOMString {
|
||||
match self.htmlelement.element.get_attr(Null, "src") {
|
||||
Some(s) => s.to_owned(),
|
||||
None => ~""
|
||||
}
|
||||
self.htmlelement.element.get_url_attribute("src")
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: DOMString) -> ErrorResult {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue