mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
script: add initialize_ui_event
method (#34524)
* retire UIEvent::InitUIEvent Signed-off-by: Jay Wang <xdddxyyyxzzz123@gmail.com> * fix fmt Signed-off-by: Jay Wang <xdddxyyyxzzz123@gmail.com> * remove unused changes Signed-off-by: Jay Wang <xdddxyyyxzzz123@gmail.com> * reimplement the spec and reuse wherever we can Signed-off-by: Jay Wang <xdddxyyyxzzz123@gmail.com> * fix lint Signed-off-by: Jay Wang <xdddxyyyxzzz123@gmail.com> --------- Signed-off-by: Jay Wang <xdddxyyyxzzz123@gmail.com>
This commit is contained in:
parent
1b1a4eca55
commit
2fbe16876c
2 changed files with 37 additions and 5 deletions
|
@ -126,6 +126,10 @@ impl Event {
|
|||
self.cancelable.set(cancelable);
|
||||
}
|
||||
|
||||
pub fn set_target(&self, target_: Option<&EventTarget>) {
|
||||
self.target.set(target_);
|
||||
}
|
||||
|
||||
/// <https://dom.spec.whatwg.org/#event-path>
|
||||
// TODO: shadow roots put special flags in the path,
|
||||
// and it will stop just being a list of bare EventTargets
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue