5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 02:51:56 +08:00

[darwin] Disable listener caching. Run execJS on main thread.

This commit is contained in:
Lea Anthony 2023-10-07 20:08:22 +11:00
parent 48aef46f57
commit ebe91ba11d
2 changed files with 6 additions and 4 deletions

View File

@ -855,7 +855,7 @@ func (w *macosWebviewWindow) minimise() {
}
func (w *macosWebviewWindow) on(eventID uint) {
C.registerListener(C.uint(eventID))
//C.registerListener(C.uint(eventID))
}
func (w *macosWebviewWindow) zoom() {
@ -952,7 +952,9 @@ func (w *macosWebviewWindow) setEnabled(enabled bool) {
}
func (w *macosWebviewWindow) execJS(js string) {
C.windowExecJS(w.nsWindow, C.CString(js))
InvokeAsync(func() {
C.windowExecJS(w.nsWindow, C.CString(js))
})
}
func (w *macosWebviewWindow) setURL(uri string) {

View File

@ -17,8 +17,8 @@ void registerListener(unsigned int event) {
}
bool hasListeners(unsigned int event) {
return hasListener[event];
//return true;
//return hasListener[event];
return true;
}
*/