`Clipboard#{read,write}` are wrong
armanbilge opened this issue ยท 4 comments
armanbilge commented
According to the MDN docs, read
and write
should be in terms of a js.Array[ClipboardItem]
. But that's not what a DataTransfer
is ...
zetashift commented
I can pick this up if you like!
armanbilge commented
@zetashift yes please! ๐ I have a renewed interest in all these APIs because of my new fs2-dom pet project ๐
zetashift commented
From https://w3c.github.io/clipboard-apis/#dom-clipboard-write
I can't exactly figure out what kind of promise
it should return?
Currently have this:
def write(data: DataTransfer): js.Promise[ClipboardItem] = js.native
armanbilge commented
@zetashift I think it should be this
def write(data: ClipboardItems): js.Promise[Unit] = js.native
undefined
is ()
aka Unit
in Scala.js