aboutsummaryrefslogtreecommitdiffstats
path: root/Mist/assets/ext/http.js
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-09-17 21:58:26 +0800
committerobscuren <geffobscura@gmail.com>2014-09-17 21:58:26 +0800
commite4cc365e89cfd7a9862aa96a77d56fbd2d41ff4a (patch)
tree7b1a9ffdd60aca8df0b8cb96a3086a9385776288 /Mist/assets/ext/http.js
parent15ded0bea9600f489d7f9fb5430c26a84a021bd2 (diff)
downloadgo-tangerine-e4cc365e89cfd7a9862aa96a77d56fbd2d41ff4a.tar.gz
go-tangerine-e4cc365e89cfd7a9862aa96a77d56fbd2d41ff4a.tar.zst
go-tangerine-e4cc365e89cfd7a9862aa96a77d56fbd2d41ff4a.zip
Renamed ethereal
Diffstat (limited to 'Mist/assets/ext/http.js')
-rw-r--r--Mist/assets/ext/http.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/Mist/assets/ext/http.js b/Mist/assets/ext/http.js
new file mode 100644
index 000000000..725ce8e6b
--- /dev/null
+++ b/Mist/assets/ext/http.js
@@ -0,0 +1,13 @@
+// this function is included locally, but you can also include separately via a header definition
+function request(url, callback) {
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = (function(req) {
+ return function() {
+ if(req.readyState === 4) {
+ callback(req);
+ }
+ }
+ })(xhr);
+ xhr.open('GET', url, true);
+ xhr.send('');
+}