mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-08 01:11:06 +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) {
|
func (w *macosWebviewWindow) on(eventID uint) {
|
||||||
C.registerListener(C.uint(eventID))
|
//C.registerListener(C.uint(eventID))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *macosWebviewWindow) zoom() {
|
func (w *macosWebviewWindow) zoom() {
|
||||||
@ -952,7 +952,9 @@ func (w *macosWebviewWindow) setEnabled(enabled bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (w *macosWebviewWindow) execJS(js string) {
|
func (w *macosWebviewWindow) execJS(js string) {
|
||||||
|
InvokeAsync(func() {
|
||||||
C.windowExecJS(w.nsWindow, C.CString(js))
|
C.windowExecJS(w.nsWindow, C.CString(js))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *macosWebviewWindow) setURL(uri string) {
|
func (w *macosWebviewWindow) setURL(uri string) {
|
||||||
|
@ -17,8 +17,8 @@ void registerListener(unsigned int event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool hasListeners(unsigned int event) {
|
bool hasListeners(unsigned int event) {
|
||||||
return hasListener[event];
|
//return hasListener[event];
|
||||||
//return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user