mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Implement Document.defaultView - fixes #4518
This commit is contained in:
parent
141b5d038f
commit
c10049327a
4 changed files with 18 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue