You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current definition for clipboardchange event is such that it doesn't work too well with the model Safari and Firefox have (paste requires explicit click on a button).
And if we require always transient user activation before the event, it would be more ergonomic to have something like
element.onclick = () => clipboard.checkCurrentClipboardTypes().then((listOfBuiltinTypes) => { /do something/});
(I'm not saying Firefox would necessarily implement that API, since it is still rather privacy sensitive)
The text was updated successfully, but these errors were encountered:
That is, no change needed if you don't want an event.
I can see an ergonomic improvement from having an event, for pages where the user expects the page to react to every clipboard change, even in the Safari+Firefox model where it only propagates during transient activation. The spec would need to change from
If the clipboard contents are changed outside the user agent, then the clipboardchange event MUST fire when the user agent regains focus.
[... with a parallel change to make check clipboard read permission allow the behaviors of all three engines]
[... and that whole statement should probably also be refactored to be more algorithmic.]
Note that, as you said, even with this change the event is somewhat more privacy-invasive than no-event (per #230), since you stop being able to treat pages that read "too often" as potentially abusive.
The current definition for clipboardchange event is such that it doesn't work too well with the model Safari and Firefox have (paste requires explicit click on a button).
And if we require always transient user activation before the event, it would be more ergonomic to have something like
element.onclick = () => clipboard.checkCurrentClipboardTypes().then((listOfBuiltinTypes) => { /do something/});
(I'm not saying Firefox would necessarily implement that API, since it is still rather privacy sensitive)
The text was updated successfully, but these errors were encountered: