mirror of
https://github.com/servo/servo.git
synced 2025-07-24 07:40:27 +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
|
@ -1884,11 +1884,10 @@ impl Document {
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-document
|
||||
pub fn Constructor(global: &GlobalScope) -> Fallible<Root<Document>> {
|
||||
let win = global.as_window();
|
||||
let doc = win.Document();
|
||||
pub fn Constructor(window: &Window) -> Fallible<Root<Document>> {
|
||||
let doc = window.Document();
|
||||
let docloader = DocumentLoader::new(&*doc.loader());
|
||||
Ok(Document::new(win,
|
||||
Ok(Document::new(window,
|
||||
None,
|
||||
None,
|
||||
IsHTMLDocument::NonHTMLDocument,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue