Bug 1619947 Comment 27 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Tom Schuster [:evilpie] from comment #26)
> No we don't support Promises in the `ClipboardItem` constructor.

Thanks. Presumably, it would make sense to throw an error?

Then, the jsfiddle mentioned in [#c25](https://bugzilla.mozilla.org/show_bug.cgi?id=1619947#c25)  would run into the `catch` case which works. See https://jsfiddle.net/80hq96ym/ for an adaptation of the above jsfiddle.

That is, the example of https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/compat2021/9yrdEPyBygQ/B685_XSwFAAJ would write the correct content to the clipboard instead of "[object Promise]".
(In reply to Tom Schuster [:evilpie] from comment #26)
> No we don't support Promises in the `ClipboardItem` constructor.

Thanks. Presumably, it would make sense to throw an error?

Then, the jsfiddle mentioned in [#c25](https://bugzilla.mozilla.org/show_bug.cgi?id=1619947#c25)  would run into the `catch` case, which works. See https://jsfiddle.net/80hq96ym/ for an adaptation of the above jsfiddle.

That is, the example of https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/compat2021/9yrdEPyBygQ/B685_XSwFAAJ would write the correct content to the clipboard instead of "[object Promise]".

Back to Bug 1619947 Comment 27