mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Make WebIDL constructors take a more specific global if possible (fixes #14071)
This commit is contained in:
parent
8af2327e95
commit
973f77c006
17 changed files with 50 additions and 49 deletions
|
@ -17,7 +17,6 @@ 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::servoparser::ServoParser;
|
||||
use dom::window::Window;
|
||||
|
||||
|
@ -41,8 +40,8 @@ impl DOMParser {
|
|||
DOMParserBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Constructor(global: &GlobalScope) -> Fallible<Root<DOMParser>> {
|
||||
Ok(DOMParser::new(global.as_window()))
|
||||
pub fn Constructor(window: &Window) -> Fallible<Root<DOMParser>> {
|
||||
Ok(DOMParser::new(window))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue