mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Pass a &GlobalScope to WebIDL static methods and constructors
This commit is contained in:
parent
1fd470889d
commit
19108aa330
56 changed files with 198 additions and 245 deletions
|
@ -5,7 +5,6 @@
|
|||
use dom::bindings::codegen::Bindings::ExtendableMessageEventBinding;
|
||||
use dom::bindings::codegen::Bindings::ExtendableMessageEventBinding::ExtendableMessageEventMethods;
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::reflector::reflect_dom_object;
|
||||
|
@ -47,12 +46,12 @@ impl ExtendableMessageEvent {
|
|||
ev
|
||||
}
|
||||
|
||||
pub fn Constructor(global: GlobalRef,
|
||||
pub fn Constructor(global: &GlobalScope,
|
||||
type_: DOMString,
|
||||
init: &ExtendableMessageEventBinding::ExtendableMessageEventInit)
|
||||
-> Fallible<Root<ExtendableMessageEvent>> {
|
||||
rooted!(in(global.get_cx()) let data = init.data);
|
||||
let ev = ExtendableMessageEvent::new(global.as_global_scope(),
|
||||
let ev = ExtendableMessageEvent::new(global,
|
||||
Atom::from(type_),
|
||||
init.parent.parent.bubbles,
|
||||
init.parent.parent.cancelable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue