mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Pass a &GlobalScope to WebIDL static methods and constructors
This commit is contained in:
parent
1fd470889d
commit
19108aa330
56 changed files with 198 additions and 245 deletions
|
@ -12,12 +12,12 @@ use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Text_xml;
|
|||
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentReadyState;
|
||||
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{JS, Root};
|
||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::{Document, IsHTMLDocument};
|
||||
use dom::document::DocumentSource;
|
||||
use dom::globalscope::GlobalScope;
|
||||
use dom::window::Window;
|
||||
use parse::html::{ParseContext, parse_html};
|
||||
use parse::xml::{self, parse_xml};
|
||||
|
@ -42,8 +42,8 @@ impl DOMParser {
|
|||
DOMParserBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Constructor(global: GlobalRef) -> Fallible<Root<DOMParser>> {
|
||||
Ok(DOMParser::new(global.as_global_scope().as_window()))
|
||||
pub fn Constructor(global: &GlobalScope) -> Fallible<Root<DOMParser>> {
|
||||
Ok(DOMParser::new(global.as_window()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue