aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmliframeelement.rs
diff options
context:
space:
mode:
authorBogdan Cuza <bogdan.cuza@hotmail.com>2015-07-21 18:53:01 +0300
committerBogdan <boghison22@gmail.com>2015-07-28 13:28:41 +0200
commit233a769c67738942a0ac47c15465e36891883c3b (patch)
treef271b64c29addb4826feb098a03a0c6ce07eb4b3 /components/script/dom/htmliframeelement.rs
parentf039827dcd618d1731f9cc0d91202690c28f10d1 (diff)
downloadservo-233a769c67738942a0ac47c15465e36891883c3b.tar.gz
servo-233a769c67738942a0ac47c15465e36891883c3b.zip
Add spec links
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r--components/script/dom/htmliframeelement.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index 99af406790b..c7c8a240772 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -254,26 +254,31 @@ pub fn Navigate(iframe: &HTMLIFrameElement, direction: NavigationDirection) -> F
}
impl<'a> HTMLIFrameElementMethods for &'a HTMLIFrameElement {
+ // https://html.spec.whatwg.org/multipage/#dom-iframe-src
fn Src(self) -> DOMString {
let element = ElementCast::from_ref(self);
element.get_string_attribute(&atom!("src"))
}
+ // https://html.spec.whatwg.org/multipage/#dom-iframe-src
fn SetSrc(self, src: DOMString) {
let element = ElementCast::from_ref(self);
element.set_url_attribute(&atom!("src"), src)
}
+ // https://html.spec.whatwg.org/multipage/#dom-iframe-sandbox
fn Sandbox(self) -> DOMString {
let element = ElementCast::from_ref(self);
element.get_string_attribute(&atom!("sandbox"))
}
+ // https://html.spec.whatwg.org/multipage/#dom-iframe-sandbox
fn SetSandbox(self, sandbox: DOMString) {
let element = ElementCast::from_ref(self);
element.set_tokenlist_attribute(&atom!("sandbox"), sandbox);
}
+ // https://html.spec.whatwg.org/multipage/#dom-iframe-contentwindow
fn GetContentWindow(self) -> Option<Root<Window>> {
self.subpage_id.get().and_then(|subpage_id| {
let window = window_from_node(self);
@@ -286,6 +291,7 @@ impl<'a> HTMLIFrameElementMethods for &'a HTMLIFrameElement {
})
}
+ // https://html.spec.whatwg.org/multipage/#dom-iframe-contentdocument
fn GetContentDocument(self) -> Option<Root<Document>> {
self.GetContentWindow().and_then(|window| {
let self_url = match self.get_url() {
@@ -319,6 +325,7 @@ impl<'a> HTMLIFrameElementMethods for &'a HTMLIFrameElement {
}
}
+ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-mozbrowser
fn SetMozbrowser(self, value: bool) -> ErrorResult {
if opts::experimental_enabled() {
let element = ElementCast::from_ref(self);