This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
A script listening to beforepaste might only want to handle certain types of content. For example, it may want to enable the paste command for text and HTML but not images. We should consider if a beforepaste listener should be allowed to inspect the types (but not the actual contents) of the clipboard data. (Technically, to do this we spec that the event object passed to all three types will be a ClipboardEvent instance and that the associated drag data store is in protected mode).
The proposed solution obviously adds type inspection to copy and cut events too - is it worth the trouble to special-case beforecut and beforecopy and give them an empty, newly initialized data store? Possibly - it could be a privacy issue, for example leaking details about installed software that can be inferred from types of clipboard content if user or website triggers copy/cut.
This should be working now