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:
parent
48aef46f57
commit
ebe91ba11d
@ -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) {
|
||||
|
@ -17,8 +17,8 @@ void registerListener(unsigned int event) {
|
||||
}
|
||||
|
||||
bool hasListeners(unsigned int event) {
|
||||
return hasListener[event];
|
||||
//return true;
|
||||
//return hasListener[event];
|
||||
return true;
|
||||
}
|
||||
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user