Skip to content

Use DOMException instead of DOMError #374

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

Closed
floating-cat opened this issue Aug 12, 2019 · 2 comments · Fixed by #375
Closed

Use DOMException instead of DOMError #374

floating-cat opened this issue Aug 12, 2019 · 2 comments · Fixed by #375

Comments

@floating-cat
Copy link
Contributor

floating-cat commented Aug 12, 2019

The current method signature of FileReader.error is

def error: DOMError = js.native

But from MDN page:

A DOMError containing the relevant error. In Chrome 48+/Firefox 58+ this property returns a DOMException because DOMError has been removed from the DOM standard.

The DOMError MDN page also says this DOMError was deprecated.

Also the DOMError and the DOMException APIs in scala-js-dom is not complete. The MDN DOMException class has three methods, but scala-js-dom API only has two, the deprecated message for DOMException.code is not incorrect now.

@sjrd
Copy link
Member

sjrd commented Aug 12, 2019

Thank you for the report. PR welcome :)

@floating-cat
Copy link
Contributor Author

floating-cat commented Aug 12, 2019

I will send a PR later!

@sjrd sjrd closed this as completed in #375 Aug 12, 2019
sjrd added a commit that referenced this issue Aug 12, 2019
Fix #374: Deprecate DOMError in favor of DOMException.
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 a pull request may close this issue.

2 participants