mirror of https://github.com/anoshenko/rui.git
Fixing
This commit is contained in:
parent
9dda89c781
commit
9a4f20f824
|
|
@ -91,9 +91,9 @@ func (storage *clientStorageData) Request(result func(key, value string), key ..
|
|||
}
|
||||
|
||||
if buffer.Len() == 0 {
|
||||
storage.bridge.callFunc("localStorageGetAll", request)
|
||||
storage.bridge.localStorageRequest("localStorageGetAll", request)
|
||||
} else {
|
||||
storage.bridge.callFunc("localStorageGet", request, buffer.String())
|
||||
storage.bridge.localStorageRequest("localStorageGet", request, buffer.String())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ type bridge interface {
|
|||
startUpdateScript(htmlID string) bool
|
||||
finishUpdateScript(htmlID string)
|
||||
callFunc(funcName string, args ...any) bool
|
||||
localStorageRequest(funcName string, args ...any)
|
||||
updateInnerHTML(htmlID, html string)
|
||||
appendToInnerHTML(htmlID, html string)
|
||||
updateCSSProperty(htmlID, property, value string)
|
||||
|
|
|
|||
|
|
@ -53,6 +53,10 @@ func (bridge *wasmBridge) callFunc(funcName string, args ...any) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func (bridge *wasmBridge) localStorageRequest(funcName string, args ...any) {
|
||||
bridge.callFunc(funcName, args...)
|
||||
}
|
||||
|
||||
func (bridge *wasmBridge) updateInnerHTML(htmlID, html string) {
|
||||
if ProtocolInDebugLog {
|
||||
DebugLog(fmt.Sprintf("%s.innerHTML = '%s'", htmlID, html))
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ type httpBridge struct {
|
|||
responseBuffer strings.Builder
|
||||
response chan string
|
||||
remoteAddress string
|
||||
//conn *websocket.Conn
|
||||
}
|
||||
|
||||
type canvasVar struct {
|
||||
|
|
@ -237,6 +236,10 @@ func (bridge *webBridge) callFunc(funcName string, args ...any) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (bridge *webBridge) localStorageRequest(funcName string, args ...any) {
|
||||
bridge.callFuncImmediately(funcName, args...)
|
||||
}
|
||||
|
||||
func (bridge *webBridge) updateInnerHTML(htmlID, html string) {
|
||||
bridge.callFunc("updateInnerHTML", htmlID, html)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue