- From: Edgar Chen <notifications@github.com>
- Date: Mon, 12 Jan 2026 13:45:51 -0800
- To: w3c/clipboard-apis <clipboard-apis@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 12 January 2026 21:45:55 UTC
EdgarChen left a comment (w3c/clipboard-apis#242)
No browser throws an exception on `ClipboardItem` constructor for invalid MIME type. Chrome and Firefox reject the `write()` if `ClipboardItem` contains any invalid MIME types. Safari ignores the invalid MIME types and still write the data for valid MIME types in `write()`, e.g. https://codepen.io/edgarchen/pen/ZYOBYRN.
And all browsers treat MIME types with parameters as invalid, for example `ClipboardItem.supports("text/plain;charset=utf-8")` returns `false`. Chrome and Firefox reject the `write()` if the MIME type has parameter. Safari also ignore it in write(), e.g. https://codepen.io/edgarchen/pen/NPrbPoO.
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/issues/242#issuecomment-3740633003
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/clipboard-apis/issues/242/3740633003@github.com>
Received on Monday, 12 January 2026 21:45:55 UTC