Created
August 5, 2011 15:45
-
-
Save arantius/1127807 to your computer and use it in GitHub Desktop.
GM_xhr with progress test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GM_xhr with progress test | |
// @namespace https://github.com/arantius | |
// @include http://localhost* | |
// ==/UserScript== | |
dump('>>> GM_xhr test starting.\n'); | |
var xhr = GM_xmlhttpRequest({ | |
method: "GET", | |
url: "http://localhost/slow.php", | |
onload: function(response) { dump('<<< onload!\n'); }, | |
onreadystatechange: function(response) { dump('<<< onreadystatechange!\n'); }, | |
onprogress: function(response) { dump('<<< onprogress!\n'); }, | |
onerror: function(response) { dump('<<< onerror!\n'); }, | |
onabort: function(response) { dump('<<< onabort!\n'); }, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment