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

GM_xmlhttpRequest really needs a synchronous mode. #1269

Closed
wants to merge 7 commits into from

Conversation

meh
Copy link
Contributor

@meh meh commented Jan 28, 2011

Shouldn't be a problem to merge to master.

Or reimplement it in some other way, this was just a fast hack to get something I needed working.

Thanks.

@meh
Copy link
Contributor Author

meh commented Jan 28, 2011

Eh, obvious security bugs, didn't read the setupRequestEvent properly.

There shouldn't be security issues now.

@erikvold
Copy link
Contributor

why is a synchronous mode needed? it's a terrible thing to do..

@meh
Copy link
Contributor Author

meh commented Apr 16, 2011

Because asynchronous requests aren't always the best way, and I don't see why not giving the developer the chance to use synchronous requests.

@erikvold
Copy link
Contributor

Because asynchronous requests aren't always the best way

when is it not?

@meh
Copy link
Contributor Author

meh commented Apr 16, 2011

In my case I had to try multiple lyrics website one after another if the previous failed, and setting up it to work with asynchronous requests would be an useless overengineering when there's synchronous mode.

@erikvold
Copy link
Contributor

In my case I had to try multiple lyrics website one after another if the previous failed, and setting up it to work with asynchronous requests would be an useless overengineering when there's synchronous mode.

It's not useless.. synchronous xhr locks the ui, asynchronous requests do not lock the ui..

@meh
Copy link
Contributor Author

meh commented Apr 17, 2011

It doesn't lock the UI for me.

And once again, leave the choice to the developer.

@na-ji
Copy link

na-ji commented Apr 28, 2011

That right, the possibility to have a synchronous mode for the function GM_xmlhttprequest will really help the developers. In some case, it can be very usefull.

That why as meh said, leave the choice to the developer is a great solution.

Thanks.

Conflicts:
	content/xmlhttprequester.js
arantius added a commit to arantius/greasemonkey that referenced this pull request Aug 5, 2011
@arantius arantius closed this Aug 5, 2011
@arantius
Copy link
Collaborator

arantius commented Aug 9, 2011

In at least some circumstances, this is currently failing with
Error: Permission denied for <http://arantius.com> to get property Object.status Source File: file:///.../gm_scripts/sync_gm_xhr_test/sync_gm_xhr_test.user.js Line: 14
Though I'm sure I saw it work at least once, also.
Currently testing in: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110628 Ubuntu/10.04 (lucid) Firefox/3.6.18

Test case: https://gist.github.com/1134362

@arantius arantius reopened this Aug 9, 2011
@arantius
Copy link
Collaborator

arantius commented Aug 9, 2011

Working on Mozilla/5.0 (X11; Linux i686 on x86_64; rv:7.0a2) Gecko/20110809 Firefox/7.0a2.

@arantius
Copy link
Collaborator

arantius commented Aug 9, 2011

Also working: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1.

So, failing in 3 only, working in 4+.

@arantius arantius closed this in c12141c Aug 10, 2011
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

4 participants