mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Pass &JS<Window> to some constructors.
This commit is contained in:
parent
b6138580d3
commit
6291aac170
11 changed files with 29 additions and 24 deletions
|
@ -31,18 +31,18 @@ impl NodeList {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(window: JS<Window>,
|
||||
pub fn new(window: &JS<Window>,
|
||||
list_type: NodeListType) -> JS<NodeList> {
|
||||
reflect_dom_object(~NodeList::new_inherited(window.clone(), list_type),
|
||||
window.get(), NodeListBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn new_simple_list(window: &JS<Window>, elements: ~[JS<Node>]) -> JS<NodeList> {
|
||||
NodeList::new(window.clone(), Simple(elements))
|
||||
NodeList::new(window, Simple(elements))
|
||||
}
|
||||
|
||||
pub fn new_child_list(window: &JS<Window>, node: &JS<Node>) -> JS<NodeList> {
|
||||
NodeList::new(window.clone(), Children(node.clone()))
|
||||
NodeList::new(window, Children(node.clone()))
|
||||
}
|
||||
|
||||
pub fn Length(&self) -> u32 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue