mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Format script component
This commit is contained in:
parent
2ca7a13473
commit
c37a345dc9
357 changed files with 25485 additions and 18076 deletions
|
@ -28,19 +28,35 @@ impl Iterable for TestBindingPairIterable {
|
|||
self.map.borrow().len() as u32
|
||||
}
|
||||
fn get_value_at_index(&self, index: u32) -> u32 {
|
||||
self.map.borrow().iter().nth(index as usize).map(|a| &a.1).unwrap().clone()
|
||||
self.map
|
||||
.borrow()
|
||||
.iter()
|
||||
.nth(index as usize)
|
||||
.map(|a| &a.1)
|
||||
.unwrap()
|
||||
.clone()
|
||||
}
|
||||
fn get_key_at_index(&self, index: u32) -> DOMString {
|
||||
self.map.borrow().iter().nth(index as usize).map(|a| &a.0).unwrap().clone()
|
||||
self.map
|
||||
.borrow()
|
||||
.iter()
|
||||
.nth(index as usize)
|
||||
.map(|a| &a.0)
|
||||
.unwrap()
|
||||
.clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl TestBindingPairIterable {
|
||||
fn new(global: &GlobalScope) -> DomRoot<TestBindingPairIterable> {
|
||||
reflect_dom_object(Box::new(TestBindingPairIterable {
|
||||
reflector: Reflector::new(),
|
||||
map: DomRefCell::new(vec![]),
|
||||
}), global, TestBindingPairIterableBinding::TestBindingPairIterableWrap)
|
||||
reflect_dom_object(
|
||||
Box::new(TestBindingPairIterable {
|
||||
reflector: Reflector::new(),
|
||||
map: DomRefCell::new(vec![]),
|
||||
}),
|
||||
global,
|
||||
TestBindingPairIterableBinding::TestBindingPairIterableWrap,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<TestBindingPairIterable>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue