diff options
author | obscuren <geffobscura@gmail.com> | 2014-08-14 06:18:37 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-08-14 06:18:37 +0800 |
commit | 95ba340d07a02da40000d4bcf2b1bb24bd7856ef (patch) | |
tree | 79a067c70f5a1624c87b17c8efed02d160a0b0b8 /ethereal/ui_lib.go | |
parent | d518423b9c493bf5b42e6575db9a32106812e6bc (diff) | |
download | go-tangerine-95ba340d07a02da40000d4bcf2b1bb24bd7856ef.tar go-tangerine-95ba340d07a02da40000d4bcf2b1bb24bd7856ef.tar.gz go-tangerine-95ba340d07a02da40000d4bcf2b1bb24bd7856ef.tar.bz2 go-tangerine-95ba340d07a02da40000d4bcf2b1bb24bd7856ef.tar.lz go-tangerine-95ba340d07a02da40000d4bcf2b1bb24bd7856ef.tar.xz go-tangerine-95ba340d07a02da40000d4bcf2b1bb24bd7856ef.tar.zst go-tangerine-95ba340d07a02da40000d4bcf2b1bb24bd7856ef.zip |
Tweaks and fixes + added webview debugger
* Require better icons .. someone? :-)
Diffstat (limited to 'ethereal/ui_lib.go')
-rw-r--r-- | ethereal/ui_lib.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ethereal/ui_lib.go b/ethereal/ui_lib.go index b7cabf3a8..f900fcaee 100644 --- a/ethereal/ui_lib.go +++ b/ethereal/ui_lib.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "path" "github.com/ethereum/eth-go" @@ -42,6 +43,15 @@ func (self *UiLib) EvalJavascriptFile(path string) { self.jsEngine.LoadExtFile(path[7:]) } +func (self *UiLib) EvalJavascriptString(str string) string { + value, err := self.jsEngine.Run(str) + if err != nil { + return err.Error() + } + + return fmt.Sprintf("%v", value) +} + func (ui *UiLib) OpenQml(path string) { container := NewQmlApplication(path[7:], ui) app := NewExtApplication(container, ui) |