-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Bug: devtools reload-and-profile feature is defeated by sync-xhr feature policy #20806
Comments
I'm not sure if that deprecation will apply to extensions. Hm. Regardless, I don't know of any other technique available to implement the reload-and-profile behavior than the sync XHR approach we currently use. (I discussed this approach with Chrome extension dev rels before implementing it because I was concerned about it too.) Any interest in submitting a PR that detects |
I'll reach out to my dev rel folks too to see if there's any alternative. Regardless yeah reworking the feature is dependant on finding that better alternative so we can put that part of the issue aside. I should have the time/ability to submit a PR for the ensafeining. If I don't, and some enterprising individual finds this in the meantime, the way to introspect this in JS is: document.featurePolicy.allowsFeature('sync-xhr') |
Not sure if I count as an enterprising individual but thought I'd have a go at this! |
Thanks Chris! 👍🏼 |
Thanks Chris et al! I'll follow up with a new issue if I find an alternative for sync xhr. |
React version: all
Steps To Reproduce
Feature-Policy: sync-xhr 'none'
and has the profiling build of react enabledThe current behavior
see
3.
aboveThe expected behavior
Ideally, this feature would not depend on synchronous XHR to function. Browsers are deprecating it and sites are blocking it via
Feature-Policy
due to third-party javascript abusing it.In its current state, the feature should fail more gracefully when the XHR is blocked due to feature policy or in the future when browsers start blocking it by default.
The text was updated successfully, but these errors were encountered: