mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Improve formatting in closeevent.rs.
This commit is contained in:
parent
16a7c792b5
commit
31ebfff9bc
1 changed files with 11 additions and 9 deletions
|
@ -13,10 +13,11 @@ use dom::bindings::js::{JSRef,Temporary, Rootable};
|
||||||
use dom::bindings::utils::reflect_dom_object;
|
use dom::bindings::utils::reflect_dom_object;
|
||||||
use dom::event::{Event, EventTypeId, EventBubbles, EventCancelable};
|
use dom::event::{Event, EventTypeId, EventBubbles, EventCancelable};
|
||||||
use script_task::ScriptChan;
|
use script_task::ScriptChan;
|
||||||
use std::borrow::ToOwned;
|
|
||||||
use std::cell::Cell;
|
|
||||||
use util::str::DOMString;
|
use util::str::DOMString;
|
||||||
|
|
||||||
|
use std::borrow::ToOwned;
|
||||||
|
use std::cell::Cell;
|
||||||
|
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct CloseEvent {
|
pub struct CloseEvent {
|
||||||
|
@ -60,7 +61,8 @@ impl CloseEvent{
|
||||||
|
|
||||||
pub fn Constructor(global: GlobalRef,
|
pub fn Constructor(global: GlobalRef,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
init: &CloseEventBinding::CloseEventInit) -> Fallible<Temporary<CloseEvent>> {
|
init: &CloseEventBinding::CloseEventInit)
|
||||||
|
-> Fallible<Temporary<CloseEvent>> {
|
||||||
let clean_status = init.wasClean.unwrap_or(true);
|
let clean_status = init.wasClean.unwrap_or(true);
|
||||||
let cd = init.code.unwrap_or(0);
|
let cd = init.code.unwrap_or(0);
|
||||||
let rsn = match init.reason.as_ref() {
|
let rsn = match init.reason.as_ref() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue