aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r--components/script/dom/window.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 756bfb5a555..2db7609bec4 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -694,6 +694,12 @@ impl WindowMethods for Window {
self.window_proxy()
}
+ // https://html.spec.whatwg.org/multipage/#accessing-other-browsing-contexts
+ fn Length(&self) -> u32 {
+ let doc = self.Document();
+ doc.iter_iframes().count() as u32
+ }
+
// https://html.spec.whatwg.org/multipage/#dom-parent
fn GetParent(&self) -> Option<DomRoot<WindowProxy>> {
// Steps 1-3.