mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Make WebIDL constructors take a more specific global if possible (fixes #14071)
This commit is contained in:
parent
8af2327e95
commit
973f77c006
17 changed files with 50 additions and 49 deletions
|
@ -53,12 +53,12 @@ impl FocusEvent {
|
|||
ev
|
||||
}
|
||||
|
||||
pub fn Constructor(global: &GlobalScope,
|
||||
pub fn Constructor(window: &Window,
|
||||
type_: DOMString,
|
||||
init: &FocusEventBinding::FocusEventInit) -> Fallible<Root<FocusEvent>> {
|
||||
let bubbles = EventBubbles::from(init.parent.parent.bubbles);
|
||||
let cancelable = EventCancelable::from(init.parent.parent.cancelable);
|
||||
let event = FocusEvent::new(global.as_window(),
|
||||
let event = FocusEvent::new(window,
|
||||
type_,
|
||||
bubbles,
|
||||
cancelable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue