mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Format script component
This commit is contained in:
parent
2ca7a13473
commit
c37a345dc9
357 changed files with 25485 additions and 18076 deletions
|
@ -33,20 +33,23 @@ impl BeforeUnloadEvent {
|
|||
}
|
||||
|
||||
pub fn new_uninitialized(window: &Window) -> DomRoot<BeforeUnloadEvent> {
|
||||
reflect_dom_object(Box::new(BeforeUnloadEvent::new_inherited()),
|
||||
window,
|
||||
BeforeUnloadEventBinding::Wrap)
|
||||
reflect_dom_object(
|
||||
Box::new(BeforeUnloadEvent::new_inherited()),
|
||||
window,
|
||||
BeforeUnloadEventBinding::Wrap,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn new(window: &Window,
|
||||
type_: Atom,
|
||||
bubbles: EventBubbles,
|
||||
cancelable: EventCancelable) -> DomRoot<BeforeUnloadEvent> {
|
||||
pub fn new(
|
||||
window: &Window,
|
||||
type_: Atom,
|
||||
bubbles: EventBubbles,
|
||||
cancelable: EventCancelable,
|
||||
) -> DomRoot<BeforeUnloadEvent> {
|
||||
let ev = BeforeUnloadEvent::new_uninitialized(window);
|
||||
{
|
||||
let event = ev.upcast::<Event>();
|
||||
event.init_event(type_, bool::from(bubbles),
|
||||
bool::from(cancelable));
|
||||
event.init_event(type_, bool::from(bubbles), bool::from(cancelable));
|
||||
}
|
||||
ev
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue