diff options
Diffstat (limited to 'components/script/dom/hashchangeevent.rs')
-rw-r--r-- | components/script/dom/hashchangeevent.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/hashchangeevent.rs b/components/script/dom/hashchangeevent.rs index 33562123ac6..c97599b25a3 100644 --- a/components/script/dom/hashchangeevent.rs +++ b/components/script/dom/hashchangeevent.rs @@ -12,6 +12,7 @@ use dom::bindings::js::Root; use dom::bindings::reflector::reflect_dom_object; use dom::bindings::str::{DOMString, USVString}; use dom::event::Event; +use dom::globalscope::GlobalScope; use string_cache::Atom; // https://html.spec.whatwg.org/multipage/#hashchangeevent @@ -31,14 +32,13 @@ impl HashChangeEvent { } } - pub fn new_uninitialized(global: GlobalRef) - -> Root<HashChangeEvent> { + pub fn new_uninitialized(global: &GlobalScope) -> Root<HashChangeEvent> { reflect_dom_object(box HashChangeEvent::new_inherited(String::new(), String::new()), global, HashChangeEventBinding::Wrap) } - pub fn new(global: GlobalRef, + pub fn new(global: &GlobalScope, type_: Atom, bubbles: bool, cancelable: bool, @@ -59,7 +59,7 @@ impl HashChangeEvent { type_: DOMString, init: &HashChangeEventBinding::HashChangeEventInit) -> Fallible<Root<HashChangeEvent>> { - Ok(HashChangeEvent::new(global, + Ok(HashChangeEvent::new(global.as_global_scope(), Atom::from(type_), init.parent.bubbles, init.parent.cancelable, |