diff options
Diffstat (limited to 'components/script/dom/text.rs')
-rw-r--r-- | components/script/dom/text.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/text.rs b/components/script/dom/text.rs index a6034a7dad5..cfa670d9acb 100644 --- a/components/script/dom/text.rs +++ b/components/script/dom/text.rs @@ -14,8 +14,8 @@ use dom::bindings::js::RootedReference; use dom::bindings::str::DOMString; use dom::characterdata::CharacterData; use dom::document::Document; -use dom::globalscope::GlobalScope; use dom::node::Node; +use dom::window::Window; /// An HTML text node. #[dom_struct] @@ -35,8 +35,8 @@ impl Text { document, TextBinding::Wrap) } - pub fn Constructor(global: &GlobalScope, text: DOMString) -> Fallible<Root<Text>> { - let document = global.as_window().Document(); + pub fn Constructor(window: &Window, text: DOMString) -> Fallible<Root<Text>> { + let document = window.Document(); Ok(Text::new(text, &document)) } } |