Re: [w3c/clipboard-apis] Should the constructor of ClipboardItem accept record<DOMString, ClipboardItemDataType>? (#102)

First of all, WebIDL does not support a method accepting either a promise type or a non-promise type (i.e. "Promise types [...] are not distinguishable with any other type."). But in this case that doesn't matter either. The way WebIDL converts an ecmascript value to a Promise type implicitly wraps any non-promise type in a promise anyway, so by accepting ClipboardItemData, the method already accepts ClipboardItemDataType as well.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/issues/102#issuecomment-540819253

Received on Thursday, 10 October 2019 22:05:57 UTC