mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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>
This commit is contained in:
parent
527eaf628a
commit
6195026db0
7 changed files with 191 additions and 3 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue