aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/html_container.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-08-15 06:24:14 +0800
committerobscuren <geffobscura@gmail.com>2014-08-15 06:24:14 +0800
commitaadc5be3ff9e3818e41d83910b9730e5f1af042e (patch)
tree3dc980f34391257eb2a0c1be3a042e99f39489f3 /ethereal/html_container.go
parent1fd69e956949671806b23b7ec1feec4f6c416a81 (diff)
downloaddexon-aadc5be3ff9e3818e41d83910b9730e5f1af042e.tar
dexon-aadc5be3ff9e3818e41d83910b9730e5f1af042e.tar.gz
dexon-aadc5be3ff9e3818e41d83910b9730e5f1af042e.tar.bz2
dexon-aadc5be3ff9e3818e41d83910b9730e5f1af042e.tar.lz
dexon-aadc5be3ff9e3818e41d83910b9730e5f1af042e.tar.xz
dexon-aadc5be3ff9e3818e41d83910b9730e5f1af042e.tar.zst
dexon-aadc5be3ff9e3818e41d83910b9730e5f1af042e.zip
Implemented new watch
* Old watch methods have been removed * Implemented new callback handlers for onWatchCb * added new Filter JS object
Diffstat (limited to 'ethereal/html_container.go')
-rw-r--r--ethereal/html_container.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/ethereal/html_container.go b/ethereal/html_container.go
index 40a9f5584..7deee487d 100644
--- a/ethereal/html_container.go
+++ b/ethereal/html_container.go
@@ -1,6 +1,7 @@
package main
import (
+ "encoding/json"
"errors"
"io/ioutil"
"net/url"
@@ -12,6 +13,7 @@ import (
"github.com/ethereum/eth-go/ethpub"
"github.com/ethereum/eth-go/ethstate"
"github.com/ethereum/eth-go/ethutil"
+ "github.com/ethereum/go-ethereum/javascript"
"github.com/go-qml/qml"
"github.com/howeyc/fsnotify"
)
@@ -131,6 +133,17 @@ func (app *HtmlApplication) StorageChanged(storageObject *ethstate.StorageState)
app.webView.Call("onStorageChangeCb", ethpub.NewPStorageState(storageObject))
}
+func (self *HtmlApplication) Messages(messages ethstate.Messages, id string) {
+ var msgs []javascript.JSMessage
+ for _, m := range messages {
+ msgs = append(msgs, javascript.NewJSMessage(m))
+ }
+
+ b, _ := json.Marshal(msgs)
+
+ self.webView.Call("onWatchedCb", string(b), id)
+}
+
func (app *HtmlApplication) Destroy() {
app.engine.Destroy()
}