Skip to content
New issue

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

DataTransfer.setData() return type can be undefined #143

Closed
wants to merge 1 commit into from

Conversation

japgolly
Copy link
Contributor

In latest Chrome I'm get:

Uncaught scala.scalajs.runtime.UndefinedBehaviorError:
An undefined behavior was detected: undefined is not an instance of java.lang.Boolean

@sjrd
Copy link
Member

sjrd commented Aug 26, 2015

Is it in the specification, or is it a chrome bug?

@mseddon
Copy link
Contributor

mseddon commented Aug 26, 2015

The current w3c editor's draft defines setData as void setData(DOMString format, DOMString data);.

http://www.w3.org/html/wg/drafts/html/master/editing.html#the-datatransfer-interface

@sjrd
Copy link
Member

sjrd commented Aug 26, 2015

If it says void, then it should be Unit in Scala.js, instead of js.UndefOr[Boolean].

@japgolly
Copy link
Contributor Author

Ya, I just assumed scala-js-dom was incomplete, didn't think it might be wrong. Checking the spec, it is and it's more than just this method. Let me submit a new PR.

@japgolly japgolly closed this Aug 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants