diff options
Diffstat (limited to 'components/script')
-rw-r--r-- | components/script/dom/document.rs | 5 | ||||
-rw-r--r-- | components/script/dom/webidls/Document.webidl | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 888796dcaee..30099bb1798 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -994,6 +994,11 @@ impl<'a> DocumentMethods for JSRef<'a, Document> { self.ready_state.get() } + // https://html.spec.whatwg.org/multipage/browsers.html#dom-document-defaultview + fn DefaultView(self) -> Temporary<Window> { + Temporary::new(self.window) + } + global_event_handlers!() event_handler!(readystatechange, GetOnreadystatechange, SetOnreadystatechange) } diff --git a/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl index 8d75f20a8f7..92b7f35c34b 100644 --- a/components/script/dom/webidls/Document.webidl +++ b/components/script/dom/webidls/Document.webidl @@ -84,5 +84,8 @@ partial interface Document { // special event handler IDL attributes that only apply to Document objects [LenientThis] attribute EventHandler onreadystatechange; + + // user interaction + readonly attribute Window defaultView; }; Document implements GlobalEventHandlers; |