aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/html_container.go
diff options
context:
space:
mode:
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()
}