mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Implement EventTarget::fire_simple_event and EventTarget::fire_simple_event_params
This commit is contained in:
parent
df087cc6cf
commit
d38771e270
8 changed files with 61 additions and 71 deletions
|
@ -858,19 +858,16 @@ impl Activatable for HTMLInputElement {
|
|||
// https://html.spec.whatwg.org/multipage/#radio-button-state-(type=radio):activation-behavior
|
||||
if self.mutable() {
|
||||
let win = window_from_node(self);
|
||||
let target = self.upcast();
|
||||
let target = self.upcast::<EventTarget>();
|
||||
|
||||
let event = Event::new(GlobalRef::Window(win.r()),
|
||||
atom!("input"),
|
||||
EventBubbles::Bubbles,
|
||||
EventCancelable::NotCancelable);
|
||||
event.fire(target);
|
||||
|
||||
let event = Event::new(GlobalRef::Window(win.r()),
|
||||
atom!("change"),
|
||||
EventBubbles::Bubbles,
|
||||
EventCancelable::NotCancelable);
|
||||
event.fire(target);
|
||||
target.fire_simple_event_params("input",
|
||||
EventBubbles::Bubbles,
|
||||
EventCancelable::NotCancelable,
|
||||
GlobalRef::Window(win.r()));
|
||||
target.fire_simple_event_params("change",
|
||||
EventBubbles::Bubbles,
|
||||
EventCancelable::NotCancelable,
|
||||
GlobalRef::Window(win.r()));
|
||||
}
|
||||
},
|
||||
_ => ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue