Skip to content

XMLHttpRequest and friends shouldn't be deprecated #606

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
japgolly opened this issue Oct 18, 2021 · 4 comments · Fixed by #607
Closed

XMLHttpRequest and friends shouldn't be deprecated #606

japgolly opened this issue Oct 18, 2021 · 4 comments · Fixed by #607

Comments

@japgolly
Copy link
Contributor

XMLHttpRequest and AjaxException are deprecated in scalajs-dom but not irl.

https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest

@japgolly
Copy link
Contributor Author

The deprecation message is to use the Fetch API instead. Yes Fetch is the better replacement for the old AJAX API, but the old AJAX API isn't deprecated. People with old code that use it do not at all need to migrate away from it, it's fine, just old.

@armanbilge
Copy link
Member

I mostly agree, I think another interpretation of this deprecation could be "we no longer maintain this facade" but given that we now facade anything experimental or poorly supported that just seems too arbitrary. We can undeprecate it 👍

@japgolly
Copy link
Contributor Author

Yeah, imo this library should be an unopinionated reflection of the dom world. If an API isn't deprecated by browsers, I don't think we should be deprecating it ourselves.

japgolly added a commit that referenced this issue Oct 18, 2021
@strelec
Copy link

strelec commented Oct 18, 2021

I think it is fair to deprecate Ajax, since that is our own facade, and Fetch is a better API that is natively supported.

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.

3 participants