aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist/assets/ext/http.js
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-29 07:24:00 +0800
committerobscuren <geffobscura@gmail.com>2015-01-29 07:24:18 +0800
commitec85458612e1d5374767f87005dd0ad5934f74d5 (patch)
treea7e11798765bd56eb088259f2ab4401ec87e4f24 /cmd/mist/assets/ext/http.js
parent73dcbf7ba23ea4d4d87d4261ff7ebaecfe0ec810 (diff)
downloadgo-tangerine-ec85458612e1d5374767f87005dd0ad5934f74d5.tar
go-tangerine-ec85458612e1d5374767f87005dd0ad5934f74d5.tar.gz
go-tangerine-ec85458612e1d5374767f87005dd0ad5934f74d5.tar.bz2
go-tangerine-ec85458612e1d5374767f87005dd0ad5934f74d5.tar.lz
go-tangerine-ec85458612e1d5374767f87005dd0ad5934f74d5.tar.xz
go-tangerine-ec85458612e1d5374767f87005dd0ad5934f74d5.tar.zst
go-tangerine-ec85458612e1d5374767f87005dd0ad5934f74d5.zip
updated ethereum.js and moved to subfolder
* Previous subtree caused a lot of trouble * Implemented sha3 in our shiny new http JSON RPC
Diffstat (limited to 'cmd/mist/assets/ext/http.js')
-rw-r--r--cmd/mist/assets/ext/http.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/cmd/mist/assets/ext/http.js b/cmd/mist/assets/ext/http.js
new file mode 100644
index 000000000..81908266f
--- /dev/null
+++ b/cmd/mist/assets/ext/http.js
@@ -0,0 +1,30 @@
+// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+// MA 02110-1301 USA
+
+// 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('');
+}