We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Clipboard#{read,write}
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 ...
read
write
js.Array[ClipboardItem]
DataTransfer
https://developer.mozilla.org/en-US/docs/Web/API/Clipboard
scala-js-dom/dom/src/main/scala/org/scalajs/dom/Clipboard.scala
Line 28 in 51a807c
Line 41 in 51a807c
The text was updated successfully, but these errors were encountered:
Clipboard
I can pick this up if you like!
Sorry, something went wrong.
@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?
promise
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
undefined
()
Unit
ClipboardItem
Merge pull request #736 from zetashift/fix/#730
1f713b1
Fixup `Clipboard` to use added `ClipboardItem`
zetashift
Successfully merging a pull request may close this issue.
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
scala-js-dom/dom/src/main/scala/org/scalajs/dom/Clipboard.scala
Line 28 in 51a807c
scala-js-dom/dom/src/main/scala/org/scalajs/dom/Clipboard.scala
Line 41 in 51a807c
The text was updated successfully, but these errors were encountered: