diff options
author | Gae24 <96017547+Gae24@users.noreply.github.com> | 2025-01-23 19:07:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-23 18:07:59 +0000 |
commit | 6195026db0d2338c377d5c1dce4afd9c91b7dcdf (patch) | |
tree | f1b57ba0556792832d09149c0469530c5698945d /components/script/dom/clipboardevent.rs | |
parent | 527eaf628a07fe9d267880680400115711860089 (diff) | |
download | servo-6195026db0d2338c377d5c1dce4afd9c91b7dcdf.tar.gz servo-6195026db0d2338c377d5c1dce4afd9c91b7dcdf.zip |
dom: set composed flag when constructing `ClipboardEvent` (#35146)
* clipboardevent: set composed flag
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* add clipboardevent test expectations
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
---------
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
Diffstat (limited to 'components/script/dom/clipboardevent.rs')
-rw-r--r-- | components/script/dom/clipboardevent.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/dom/clipboardevent.rs b/components/script/dom/clipboardevent.rs index 4791b73e7a9..768ea5394c9 100644 --- a/components/script/dom/clipboardevent.rs +++ b/components/script/dom/clipboardevent.rs @@ -71,10 +71,9 @@ impl ClipboardEventMethods<crate::DomTypeHolder> for ClipboardEvent { type_: DOMString, init: &ClipboardEventInit, ) -> DomRoot<ClipboardEvent> { - // Missing composed field let bubbles = EventBubbles::from(init.parent.bubbles); let cancelable = EventCancelable::from(init.parent.cancelable); - ClipboardEvent::new( + let event = ClipboardEvent::new( window, proto, type_, @@ -82,7 +81,9 @@ impl ClipboardEventMethods<crate::DomTypeHolder> for ClipboardEvent { cancelable, init.clipboardData.as_deref(), can_gc, - ) + ); + event.upcast::<Event>().set_composed(init.parent.composed); + event } /// <https://www.w3.org/TR/clipboard-apis/#dom-clipboardevent-clipboarddata> |