mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Format script component
This commit is contained in:
parent
2ca7a13473
commit
c37a345dc9
357 changed files with 25485 additions and 18076 deletions
|
@ -25,8 +25,11 @@ impl TouchList {
|
|||
}
|
||||
|
||||
pub fn new(window: &Window, touches: &[&Touch]) -> DomRoot<TouchList> {
|
||||
reflect_dom_object(Box::new(TouchList::new_inherited(touches)),
|
||||
window, TouchListBinding::Wrap)
|
||||
reflect_dom_object(
|
||||
Box::new(TouchList::new_inherited(touches)),
|
||||
window,
|
||||
TouchListBinding::Wrap,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +41,9 @@ impl TouchListMethods for TouchList {
|
|||
|
||||
/// <https://w3c.github.io/touch-events/#widl-TouchList-item-getter-Touch-unsigned-long-index>
|
||||
fn Item(&self, index: u32) -> Option<DomRoot<Touch>> {
|
||||
self.touches.get(index as usize).map(|js| DomRoot::from_ref(&**js))
|
||||
self.touches
|
||||
.get(index as usize)
|
||||
.map(|js| DomRoot::from_ref(&**js))
|
||||
}
|
||||
|
||||
/// <https://w3c.github.io/touch-events/#widl-TouchList-item-getter-Touch-unsigned-long-index>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue