w3c / clipboard-apis

Clipboard API and events
https://w3c.github.io/clipboard-apis/
Other
148 stars 41 forks source link

Initialization of clipboardData by ClipboardEvent constructor #64

Open inexorabletash opened 6 years ago

inexorabletash commented 6 years ago

Per https://bugs.chromium.org/p/chromium/issues/detail?id=800742

In Chrome 63, this results in null: new ClipboardEvent('paste').clipboardData - there's no code to populate the event's clipboardData with anything if it's not provided e.g. by passing {clipboardData: new DataTransfer} as the options. Firefox provides a default DataTransfer instance.

Two problems:

I'd expect the constructor prose to say something like "If eventInitDict is not given, or eventInitDict's clipboardData dictionary member is null, then initialize event's clipboardData to a newly created DataTransfer object." to fix the first point.

But then the second point is weird - how do you get a null in there?

bullwinkle commented 4 years ago

Any news here ?

FSou1 commented 4 years ago

Any updates?