Closed armanbilge closed 1 year ago
I can pick this up if you like!
@zetashift yes please! 😃 I have a renewed interest in all these APIs because of my new fs2-dom pet project 😋
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
@zetashift I think it should be this
def write(data: ClipboardItems): js.Promise[Unit] = js.native
undefined
is ()
aka Unit
in Scala.js
According to the MDN docs,
read
andwrite
should be in terms of ajs.Array[ClipboardItem]
. But that's not what aDataTransfer
is ...https://developer.mozilla.org/en-US/docs/Web/API/Clipboard
https://github.com/scala-js/scala-js-dom/blob/51a807cc04ea134ece030d6d4005a8ce30c1de99/dom/src/main/scala/org/scalajs/dom/Clipboard.scala#L28
https://github.com/scala-js/scala-js-dom/blob/51a807cc04ea134ece030d6d4005a8ce30c1de99/dom/src/main/scala/org/scalajs/dom/Clipboard.scala#L41