From ae1de6593c31fbaa4429588cea2702dd5b01a722 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 19 Sep 2014 13:33:15 +0200 Subject: renamed --- mist/assets/ext/http.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 mist/assets/ext/http.js (limited to 'mist/assets/ext/http.js') 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(''); +} -- cgit