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
|
@ -13,6 +13,7 @@ use dom::bindings::reflector::reflect_dom_object;
|
|||
use dom::bindings::str::DOMString;
|
||||
use dom::event::Event;
|
||||
use dom::globalscope::GlobalScope;
|
||||
use dom::window::Window;
|
||||
use servo_atoms::Atom;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -46,9 +47,10 @@ impl TransitionEvent {
|
|||
ev
|
||||
}
|
||||
|
||||
pub fn Constructor(global: &GlobalScope,
|
||||
pub fn Constructor(window: &Window,
|
||||
type_: DOMString,
|
||||
init: &TransitionEventInit) -> Fallible<Root<TransitionEvent>> {
|
||||
let global = window.upcast::<GlobalScope>();
|
||||
Ok(TransitionEvent::new(global, Atom::from(type_), init))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue