aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/assets/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ethereal/assets/ext')
-rw-r--r--ethereal/assets/ext/ethereum.js16
-rw-r--r--ethereal/assets/ext/test.html4
2 files changed, 18 insertions, 2 deletions
diff --git a/ethereal/assets/ext/ethereum.js b/ethereal/assets/ext/ethereum.js
index fb8bd23a7..697a404a3 100644
--- a/ethereal/assets/ext/ethereum.js
+++ b/ethereal/assets/ext/ethereum.js
@@ -6,7 +6,8 @@ window.eth = {
test: function() {
var t = undefined;
- navigator.qt.onmessage = function(d) { t = d; }
+ postData({call: "test"})
+ navigator.qt.onmessage = function(d) {console.log("onmessage called"); t = d; }
for(;;) {
if(t !== undefined) {
return t
@@ -14,7 +15,8 @@ window.eth = {
}
},
- mutan: function(code) {
+ mutan: function(code, cb) {
+ postData({call: "mutan", args: [code]}, cb)
},
toHex: function(str) {
@@ -281,3 +283,13 @@ navigator.qt.onmessage = function(ev) {
}
}
}
+
+eth.on("chain:changed", function() {
+})
+
+eth.on("messages", { /* filters */}, function(messages){
+})
+
+eth.on("pending:changed", function() {
+})
+
diff --git a/ethereal/assets/ext/test.html b/ethereal/assets/ext/test.html
index 629e98377..4bac7d36f 100644
--- a/ethereal/assets/ext/test.html
+++ b/ethereal/assets/ext/test.html
@@ -32,6 +32,10 @@ function test() {
eth.getBlock("f70097659f329a09642a27f11338d9269de64f1d4485786e36bfc410832148cd", function(block) {
console.log(block)
})
+
+ eth.mutan("var a = 10", function(code) {
+ console.log("code", code)
+ });
}
</script>