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

The CMS uses deprecated synchronous XMLHttpRequests #1417

Open
1 task
GuySartorelli opened this issue Dec 11, 2022 · 1 comment
Open
1 task

The CMS uses deprecated synchronous XMLHttpRequests #1417

GuySartorelli opened this issue Dec 11, 2022 · 1 comment

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented Dec 11, 2022

When navigating to an edit form for a page, the following warning is displayed in the console:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/

The spec says

Synchronous XMLHttpRequest outside of workers is in the process of being removed from the web platform as it has detrimental effects to the end user’s experience. (This is a long process that takes many years.) Developers must not pass false for the async argument when the current global object is a Window object. User agents are strongly encouraged to warn about such usage in developer tools and may experiment with throwing an "InvalidAccessError" DOMException when it occurs.

This isn't currently causing problems, but it definitely will eventually when browsers simply stop supporting that behaviour. This has been deprecated for a long time so the functionality could theoretically stop working at any moment.

It's possible this is also done in other places which is why I've opened this issue in admin instead of cms.

Explicit steps to reproduce:

  1. navigate to /admin/pages
  2. Click on any page in the site tree

This is not reproducible if you are already viewing an edit form - you must navigate to /admin/pages first.

Acceptance criteria

  • The CMS does not use any deprecated synchronous XMLHttpRequest
@maxime-rainville
Copy link
Contributor

It won't make the cut off for CMS5. Our assumption is that this can be ship in a minor later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants