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

fix XMLHttpRequests that don't have the "async" parameter #2792

Merged
merged 2 commits into from Jan 8, 2018

Conversation

ToadKing
Copy link
Contributor

@ToadKing ToadKing commented Jan 7, 2018

The #2771 fix has a bug in it. If you don't supply the optional async parameter it defaults to undefined, which evalulates to false. It should default to true if it's not supplied. This fixes the xhr shim.

@ToadKing
Copy link
Contributor Author

ToadKing commented Jan 7, 2018

Made some extra changes to the shim:

  • Replaces XMLHttpRequest.prototype.open instead of wrapping the XMLHttpRequest constructor. Also fixes scripts that might use the prototype directly bypassing the fix.
  • Shim block is no longer in a function. Not needed anymore since we don't use var anywhere and don't have to worry about hoisting.

@arantius arantius merged commit c341a10 into greasemonkey:master Jan 8, 2018
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

2 participants