mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add auxiliary method to EventTargetHelpers for events without target
fixup! Add auxiliary method to EventTargetHelpers for events without target
This commit is contained in:
parent
1bc2c8a639
commit
79487252ca
7 changed files with 21 additions and 15 deletions
|
@ -16,6 +16,7 @@ pub fn dispatch_event<'a, 'b>(target: JSRef<'a, EventTarget>,
|
|||
pseudo_target: Option<JSRef<'b, EventTarget>>,
|
||||
event: JSRef<Event>) -> bool {
|
||||
assert!(!event.dispatching());
|
||||
assert!(event.initialized());
|
||||
|
||||
event.set_target(match pseudo_target {
|
||||
Some(pseudo_target) => pseudo_target,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue