mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Updated reflect_dom_object to be passed by value
This commit is contained in:
parent
9cea3ce266
commit
2cbf5a3671
51 changed files with 75 additions and 75 deletions
|
@ -37,13 +37,13 @@ impl CustomEvent {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new_uninitialized(global: &GlobalRef) -> Temporary<CustomEvent> {
|
||||
pub fn new_uninitialized(global: GlobalRef) -> Temporary<CustomEvent> {
|
||||
reflect_dom_object(box CustomEvent::new_inherited(CustomEventTypeId),
|
||||
global,
|
||||
CustomEventBinding::Wrap)
|
||||
}
|
||||
pub fn new(global: &GlobalRef, type_: DOMString, bubbles: bool, cancelable: bool, detail: JSVal) -> Temporary<CustomEvent> {
|
||||
let ev = CustomEvent::new_uninitialized(global).root();
|
||||
let ev = CustomEvent::new_uninitialized(*global).root();
|
||||
ev.InitCustomEvent(global.get_cx(), type_, bubbles, cancelable, detail);
|
||||
Temporary::from_rooted(*ev)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue