mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Split TCast::to into TCast::to_unchecked and TCast::to.
This commit is contained in:
parent
19a7c429a1
commit
0fccf5e386
10 changed files with 71 additions and 64 deletions
|
@ -28,7 +28,7 @@ pub fn dispatch_event(target: &JS<EventTarget>,
|
|||
|
||||
//TODO: no chain if not participating in a tree
|
||||
if target.get().is_node() {
|
||||
let target_node: JS<Node> = NodeCast::to(target);
|
||||
let target_node: JS<Node> = NodeCast::to(target).unwrap();
|
||||
for ancestor in target_node.ancestors() {
|
||||
let ancestor_target: JS<EventTarget> = EventTargetCast::from(&ancestor);
|
||||
chain.push(ancestor_target);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue