mirror of
https://github.com/servo/servo.git
synced 2025-06-21 23:59:00 +01:00
implement NodeList and consolidate common scope and context retrieval
This commit is contained in:
parent
bc3eeb6f1c
commit
9fe9145be4
13 changed files with 180 additions and 72 deletions
|
@ -32,13 +32,6 @@ impl HTMLDocument {
|
|||
let compartment = window.get_ref().page.js_info.get_ref().js_compartment;
|
||||
AbstractDocument::as_abstract(compartment.cx.ptr, doc)
|
||||
}
|
||||
|
||||
fn get_scope_and_cx(&self) -> (*JSObject, *JSContext) {
|
||||
let win = self.parent.window.get_ref();
|
||||
let cx = win.page.js_info.get_ref().js_compartment.cx.ptr;
|
||||
let scope = win.reflector().get_jsobject();
|
||||
(scope, cx)
|
||||
}
|
||||
}
|
||||
|
||||
impl ReflectableDocument for HTMLDocument {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue