Introduce GlobalScope::as_window

This commit is contained in:
Anthony Ramine 2016-10-02 16:19:43 +02:00
parent 2f54022761
commit 766010379e
22 changed files with 30 additions and 43 deletions

View file

@ -104,7 +104,8 @@ impl KeyboardEvent {
pub fn Constructor(global: GlobalRef,
type_: DOMString,
init: &KeyboardEventBinding::KeyboardEventInit) -> Fallible<Root<KeyboardEvent>> {
let event = KeyboardEvent::new(global.as_window(), type_,
let event = KeyboardEvent::new(global.as_global_scope().as_window(),
type_,
init.parent.parent.parent.bubbles,
init.parent.parent.parent.cancelable,
init.parent.parent.view.r(),