diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-25 23:56:32 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-26 09:48:55 +0200 |
commit | 7be32fb2371a14ba61b008a37e79761f66c073c7 (patch) | |
tree | f6ff7b73173ce6e39351199d7a5e67386c73659e /components/script/dom/gamepadlist.rs | |
parent | 0e3c54c1911ba2c3bf305ee04f04fcd9bf2fc2fe (diff) | |
download | servo-7be32fb2371a14ba61b008a37e79761f66c073c7.tar.gz servo-7be32fb2371a14ba61b008a37e79761f66c073c7.zip |
Rename JS<T> to Dom<T>
Diffstat (limited to 'components/script/dom/gamepadlist.rs')
-rw-r--r-- | components/script/dom/gamepadlist.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/gamepadlist.rs b/components/script/dom/gamepadlist.rs index 9c84a059703..dec21410c9d 100644 --- a/components/script/dom/gamepadlist.rs +++ b/components/script/dom/gamepadlist.rs @@ -6,7 +6,7 @@ use dom::bindings::cell::DOMRefCell; use dom::bindings::codegen::Bindings::GamepadListBinding; use dom::bindings::codegen::Bindings::GamepadListBinding::GamepadListMethods; use dom::bindings::reflector::{Reflector, reflect_dom_object}; -use dom::bindings::root::{JS, Root}; +use dom::bindings::root::{Dom, Root}; use dom::gamepad::Gamepad; use dom::globalscope::GlobalScope; use dom_struct::dom_struct; @@ -15,14 +15,14 @@ use dom_struct::dom_struct; #[dom_struct] pub struct GamepadList { reflector_: Reflector, - list: DOMRefCell<Vec<JS<Gamepad>>> + list: DOMRefCell<Vec<Dom<Gamepad>>> } impl GamepadList { fn new_inherited(list: &[&Gamepad]) -> GamepadList { GamepadList { reflector_: Reflector::new(), - list: DOMRefCell::new(list.iter().map(|g| JS::from_ref(&**g)).collect()) + list: DOMRefCell::new(list.iter().map(|g| Dom::from_ref(&**g)).collect()) } } @@ -35,7 +35,7 @@ impl GamepadList { pub fn add_if_not_exists(&self, gamepads: &[Root<Gamepad>]) { for gamepad in gamepads { if !self.list.borrow().iter().any(|g| g.gamepad_id() == gamepad.gamepad_id()) { - self.list.borrow_mut().push(JS::from_ref(&*gamepad)); + self.list.borrow_mut().push(Dom::from_ref(&*gamepad)); // Ensure that the gamepad has the correct index gamepad.update_index(self.list.borrow().len() as i32 - 1); } |