+
3
diff --git a/v3/examples/events/assets/index.html b/v3/examples/events/assets/index.html
index 1e59ac92f..df15c1c50 100644
--- a/v3/examples/events/assets/index.html
+++ b/v3/examples/events/assets/index.html
@@ -9,7 +9,7 @@
Events Demo
-
+
diff --git a/v3/internal/runtime/desktop/contextmenu.js b/v3/internal/runtime/desktop/contextmenu.js
index ae2aff89a..7b6e2c1f4 100644
--- a/v3/internal/runtime/desktop/contextmenu.js
+++ b/v3/internal/runtime/desktop/contextmenu.js
@@ -19,7 +19,7 @@ function contextMenuHandler(event) {
}
function processContextMenu(element, event) {
- let id = element.getAttribute('data-contextmenu-id');
+ let id = element.getAttribute('data-contextmenu');
if (id) {
event.preventDefault();
openContextMenu(id, event.clientX, event.clientY, element.getAttribute('data-contextmenu-data'));
diff --git a/v3/internal/runtime/runtime_debug_desktop_darwin.js b/v3/internal/runtime/runtime_debug_desktop_darwin.js
index 0b2d59d6d..abab0f000 100644
--- a/v3/internal/runtime/runtime_debug_desktop_darwin.js
+++ b/v3/internal/runtime/runtime_debug_desktop_darwin.js
@@ -291,7 +291,7 @@
processContextMenu(event.target, event);
}
function processContextMenu(element, event) {
- let id = element.getAttribute("data-contextmenu-id");
+ let id = element.getAttribute("data-contextmenu");
if (id) {
event.preventDefault();
openContextMenu(id, event.clientX, event.clientY, element.getAttribute("data-contextmenu-data"));
diff --git a/v3/internal/runtime/runtime_debug_desktop_linux.js b/v3/internal/runtime/runtime_debug_desktop_linux.js
index 0b2d59d6d..abab0f000 100644
--- a/v3/internal/runtime/runtime_debug_desktop_linux.js
+++ b/v3/internal/runtime/runtime_debug_desktop_linux.js
@@ -291,7 +291,7 @@
processContextMenu(event.target, event);
}
function processContextMenu(element, event) {
- let id = element.getAttribute("data-contextmenu-id");
+ let id = element.getAttribute("data-contextmenu");
if (id) {
event.preventDefault();
openContextMenu(id, event.clientX, event.clientY, element.getAttribute("data-contextmenu-data"));
diff --git a/v3/internal/runtime/runtime_debug_desktop_windows.js b/v3/internal/runtime/runtime_debug_desktop_windows.js
index 0b2d59d6d..abab0f000 100644
--- a/v3/internal/runtime/runtime_debug_desktop_windows.js
+++ b/v3/internal/runtime/runtime_debug_desktop_windows.js
@@ -291,7 +291,7 @@
processContextMenu(event.target, event);
}
function processContextMenu(element, event) {
- let id = element.getAttribute("data-contextmenu-id");
+ let id = element.getAttribute("data-contextmenu");
if (id) {
event.preventDefault();
openContextMenu(id, event.clientX, event.clientY, element.getAttribute("data-contextmenu-data"));
diff --git a/v3/internal/runtime/runtime_production_desktop_darwin.js b/v3/internal/runtime/runtime_production_desktop_darwin.js
index 941982c1b..97f6f5d7a 100644
--- a/v3/internal/runtime/runtime_production_desktop_darwin.js
+++ b/v3/internal/runtime/runtime_production_desktop_darwin.js
@@ -1 +1 @@
-(()=>{var H=Object.defineProperty;var f=(e,t)=>{for(var n in t)H(e,n,{get:t[n],enumerable:!0})};var m={};f(m,{SetText:()=>Q,Text:()=>B});var I=window.location.origin+"/wails/runtime";function h(e,t){let n=new URL(I);return n.searchParams.append("method",e),t&&n.searchParams.append("args",JSON.stringify(t)),new Promise((i,r)=>{fetch(n).then(o=>{if(o.ok)return o.headers.get("content-type")&&o.headers.get("content-type").indexOf("application/json")!==-1?o.json():o.text();r(Error(o.statusText))}).then(o=>i(o)).catch(o=>r(o))})}function l(e,t){return!t||t===-1?function(n,i){return h(e+"."+n,i)}:function(n,i){return i=i||{},i.windowID=t,h(e+"."+n,i)}}var g=l("clipboard");function Q(e){return g("SetText",{text:e})}function B(){return g("Text")}var x={};f(x,{Hide:()=>N,Quit:()=>G,Show:()=>J});var p=l("application");function N(){return p("Hide")}function J(){return p("Show")}function G(){return p("Quit")}var d={};f(d,{Log:()=>Y});var X=l("log");function Y(e){return X("Log",e)}function S(e){let t=l("window",e);return{Center:()=>t("Center"),SetTitle:n=>t("SetTitle",{title:n}),Fullscreen:()=>t("Fullscreen"),UnFullscreen:()=>t("UnFullscreen"),SetSize:(n,i)=>t("SetSize",{width:n,height:i}),Size:()=>t("Size"),SetMaxSize:(n,i)=>t("SetMaxSize",{width:n,height:i}),SetMinSize:(n,i)=>t("SetMinSize",{width:n,height:i}),SetAlwaysOnTop:n=>t("SetAlwaysOnTop",{alwaysOnTop:n}),SetPosition:(n,i)=>t("SetPosition",{x:n,y:i}),Position:()=>t("Position"),Screen:()=>t("Screen"),Hide:()=>t("Hide"),Maximise:()=>t("Maximise"),Show:()=>t("Show"),ToggleMaximise:()=>t("ToggleMaximise"),UnMaximise:()=>t("UnMaximise"),Minimise:()=>t("Minimise"),UnMinimise:()=>t("UnMinimise"),SetBackgroundColour:(n,i,r,o)=>t("SetBackgroundColour",{r:n,g:i,b:r,a:o})}}var _=l("events"),w=class{constructor(t,n,i){this.eventName=t,this.maxCallbacks=i||-1,this.Callback=r=>(n(r),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}};var a=new Map;function s(e,t,n){let i=a.get(e)||[],r=new w(e,t,n);return i.push(r),a.set(e,i),()=>j(r)}function C(e,t){return s(e,t,-1)}function M(e,t){return s(e,t,1)}function j(e){let t=e.eventName,n=a.get(t).filter(i=>i!==e);n.length===0?a.delete(t):a.set(t,n)}function O(e){console.log("dispatching event: ",{event:e});let t=a.get(e.name);if(t){let n=[];t.forEach(i=>{i.Callback(e)&&n.push(i)}),n.length>0&&(t=t.filter(i=>!n.includes(i)),t.length===0?a.delete(e.name):a.set(e.name,t))}}function b(e,...t){[e,...t].forEach(i=>{a.delete(i)})}function E(){a.clear()}function v(e){return _("Emit",e)}var q="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var R=(e=21)=>{let t="",n=e;for(;n--;)t+=q[Math.random()*64|0];return t};var K=l("dialog"),u=new Map;function V(){let e;do e=R();while(u.has(e));return e}function T(e,t,n){let i=u.get(e);i&&(n?i.resolve(JSON.parse(t)):i.resolve(t),u.delete(e))}function k(e,t){let n=u.get(e);n&&(n.reject(t),u.delete(e))}function c(e,t){return new Promise((n,i)=>{let r=V();t=t||{},t["dialog-id"]=r,u.set(r,{resolve:n,reject:i}),K(e,t).catch(o=>{i(o),u.delete(r)})})}function A(e){return c("Info",e)}function F(e){return c("Warning",e)}function U(e){return c("Error",e)}function z(e){return c("Question",e)}function L(e){return c("OpenFile",e)}function P(e){return c("SaveFile",e)}var Z=l("contextmenu");function $(e,t,n,i){return Z("OpenContextMenu",{id:e,x:t,y:n,data:i})}function y(e){e?window.addEventListener("contextmenu",W):window.removeEventListener("contextmenu",W)}function W(e){D(e.target,e)}function D(e,t){let n=e.getAttribute("data-contextmenu-id");if(n)t.preventDefault(),$(n,t.clientX,t.clientY,e.getAttribute("data-contextmenu-data"));else{let i=e.parentElement;i&&D(i,t)}}window.wails={...ee(-1)};window._wails={dialogCallback:T,dialogErrorCallback:k,dispatchCustomEvent:O};function ee(e){return{Clipboard:{...m},Application:{...x},Log:d,Dialog:{Info:A,Warning:F,Error:U,Question:z,OpenFile:L,SaveFile:P},Events:{Emit:v,On:C,Once:M,OnMultiple:s,Off:b,OffAll:E},Window:S(e)}}console.log("Wails v3.0.0 Debug Mode Enabled");y(!0);})();
+(()=>{var H=Object.defineProperty;var f=(e,t)=>{for(var n in t)H(e,n,{get:t[n],enumerable:!0})};var m={};f(m,{SetText:()=>Q,Text:()=>B});var I=window.location.origin+"/wails/runtime";function h(e,t){let n=new URL(I);return n.searchParams.append("method",e),t&&n.searchParams.append("args",JSON.stringify(t)),new Promise((i,r)=>{fetch(n).then(o=>{if(o.ok)return o.headers.get("content-type")&&o.headers.get("content-type").indexOf("application/json")!==-1?o.json():o.text();r(Error(o.statusText))}).then(o=>i(o)).catch(o=>r(o))})}function l(e,t){return!t||t===-1?function(n,i){return h(e+"."+n,i)}:function(n,i){return i=i||{},i.windowID=t,h(e+"."+n,i)}}var g=l("clipboard");function Q(e){return g("SetText",{text:e})}function B(){return g("Text")}var x={};f(x,{Hide:()=>N,Quit:()=>G,Show:()=>J});var p=l("application");function N(){return p("Hide")}function J(){return p("Show")}function G(){return p("Quit")}var d={};f(d,{Log:()=>Y});var X=l("log");function Y(e){return X("Log",e)}function S(e){let t=l("window",e);return{Center:()=>t("Center"),SetTitle:n=>t("SetTitle",{title:n}),Fullscreen:()=>t("Fullscreen"),UnFullscreen:()=>t("UnFullscreen"),SetSize:(n,i)=>t("SetSize",{width:n,height:i}),Size:()=>t("Size"),SetMaxSize:(n,i)=>t("SetMaxSize",{width:n,height:i}),SetMinSize:(n,i)=>t("SetMinSize",{width:n,height:i}),SetAlwaysOnTop:n=>t("SetAlwaysOnTop",{alwaysOnTop:n}),SetPosition:(n,i)=>t("SetPosition",{x:n,y:i}),Position:()=>t("Position"),Screen:()=>t("Screen"),Hide:()=>t("Hide"),Maximise:()=>t("Maximise"),Show:()=>t("Show"),ToggleMaximise:()=>t("ToggleMaximise"),UnMaximise:()=>t("UnMaximise"),Minimise:()=>t("Minimise"),UnMinimise:()=>t("UnMinimise"),SetBackgroundColour:(n,i,r,o)=>t("SetBackgroundColour",{r:n,g:i,b:r,a:o})}}var _=l("events"),w=class{constructor(t,n,i){this.eventName=t,this.maxCallbacks=i||-1,this.Callback=r=>(n(r),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}};var a=new Map;function s(e,t,n){let i=a.get(e)||[],r=new w(e,t,n);return i.push(r),a.set(e,i),()=>j(r)}function C(e,t){return s(e,t,-1)}function M(e,t){return s(e,t,1)}function j(e){let t=e.eventName,n=a.get(t).filter(i=>i!==e);n.length===0?a.delete(t):a.set(t,n)}function O(e){console.log("dispatching event: ",{event:e});let t=a.get(e.name);if(t){let n=[];t.forEach(i=>{i.Callback(e)&&n.push(i)}),n.length>0&&(t=t.filter(i=>!n.includes(i)),t.length===0?a.delete(e.name):a.set(e.name,t))}}function b(e,...t){[e,...t].forEach(i=>{a.delete(i)})}function E(){a.clear()}function v(e){return _("Emit",e)}var q="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var R=(e=21)=>{let t="",n=e;for(;n--;)t+=q[Math.random()*64|0];return t};var K=l("dialog"),u=new Map;function V(){let e;do e=R();while(u.has(e));return e}function T(e,t,n){let i=u.get(e);i&&(n?i.resolve(JSON.parse(t)):i.resolve(t),u.delete(e))}function k(e,t){let n=u.get(e);n&&(n.reject(t),u.delete(e))}function c(e,t){return new Promise((n,i)=>{let r=V();t=t||{},t["dialog-id"]=r,u.set(r,{resolve:n,reject:i}),K(e,t).catch(o=>{i(o),u.delete(r)})})}function A(e){return c("Info",e)}function F(e){return c("Warning",e)}function U(e){return c("Error",e)}function z(e){return c("Question",e)}function L(e){return c("OpenFile",e)}function P(e){return c("SaveFile",e)}var Z=l("contextmenu");function $(e,t,n,i){return Z("OpenContextMenu",{id:e,x:t,y:n,data:i})}function y(e){e?window.addEventListener("contextmenu",W):window.removeEventListener("contextmenu",W)}function W(e){D(e.target,e)}function D(e,t){let n=e.getAttribute("data-contextmenu");if(n)t.preventDefault(),$(n,t.clientX,t.clientY,e.getAttribute("data-contextmenu-data"));else{let i=e.parentElement;i&&D(i,t)}}window.wails={...ee(-1)};window._wails={dialogCallback:T,dialogErrorCallback:k,dispatchCustomEvent:O};function ee(e){return{Clipboard:{...m},Application:{...x},Log:d,Dialog:{Info:A,Warning:F,Error:U,Question:z,OpenFile:L,SaveFile:P},Events:{Emit:v,On:C,Once:M,OnMultiple:s,Off:b,OffAll:E},Window:S(e)}}console.log("Wails v3.0.0 Debug Mode Enabled");y(!0);})();
diff --git a/v3/internal/runtime/runtime_production_desktop_linux.js b/v3/internal/runtime/runtime_production_desktop_linux.js
index 941982c1b..97f6f5d7a 100644
--- a/v3/internal/runtime/runtime_production_desktop_linux.js
+++ b/v3/internal/runtime/runtime_production_desktop_linux.js
@@ -1 +1 @@
-(()=>{var H=Object.defineProperty;var f=(e,t)=>{for(var n in t)H(e,n,{get:t[n],enumerable:!0})};var m={};f(m,{SetText:()=>Q,Text:()=>B});var I=window.location.origin+"/wails/runtime";function h(e,t){let n=new URL(I);return n.searchParams.append("method",e),t&&n.searchParams.append("args",JSON.stringify(t)),new Promise((i,r)=>{fetch(n).then(o=>{if(o.ok)return o.headers.get("content-type")&&o.headers.get("content-type").indexOf("application/json")!==-1?o.json():o.text();r(Error(o.statusText))}).then(o=>i(o)).catch(o=>r(o))})}function l(e,t){return!t||t===-1?function(n,i){return h(e+"."+n,i)}:function(n,i){return i=i||{},i.windowID=t,h(e+"."+n,i)}}var g=l("clipboard");function Q(e){return g("SetText",{text:e})}function B(){return g("Text")}var x={};f(x,{Hide:()=>N,Quit:()=>G,Show:()=>J});var p=l("application");function N(){return p("Hide")}function J(){return p("Show")}function G(){return p("Quit")}var d={};f(d,{Log:()=>Y});var X=l("log");function Y(e){return X("Log",e)}function S(e){let t=l("window",e);return{Center:()=>t("Center"),SetTitle:n=>t("SetTitle",{title:n}),Fullscreen:()=>t("Fullscreen"),UnFullscreen:()=>t("UnFullscreen"),SetSize:(n,i)=>t("SetSize",{width:n,height:i}),Size:()=>t("Size"),SetMaxSize:(n,i)=>t("SetMaxSize",{width:n,height:i}),SetMinSize:(n,i)=>t("SetMinSize",{width:n,height:i}),SetAlwaysOnTop:n=>t("SetAlwaysOnTop",{alwaysOnTop:n}),SetPosition:(n,i)=>t("SetPosition",{x:n,y:i}),Position:()=>t("Position"),Screen:()=>t("Screen"),Hide:()=>t("Hide"),Maximise:()=>t("Maximise"),Show:()=>t("Show"),ToggleMaximise:()=>t("ToggleMaximise"),UnMaximise:()=>t("UnMaximise"),Minimise:()=>t("Minimise"),UnMinimise:()=>t("UnMinimise"),SetBackgroundColour:(n,i,r,o)=>t("SetBackgroundColour",{r:n,g:i,b:r,a:o})}}var _=l("events"),w=class{constructor(t,n,i){this.eventName=t,this.maxCallbacks=i||-1,this.Callback=r=>(n(r),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}};var a=new Map;function s(e,t,n){let i=a.get(e)||[],r=new w(e,t,n);return i.push(r),a.set(e,i),()=>j(r)}function C(e,t){return s(e,t,-1)}function M(e,t){return s(e,t,1)}function j(e){let t=e.eventName,n=a.get(t).filter(i=>i!==e);n.length===0?a.delete(t):a.set(t,n)}function O(e){console.log("dispatching event: ",{event:e});let t=a.get(e.name);if(t){let n=[];t.forEach(i=>{i.Callback(e)&&n.push(i)}),n.length>0&&(t=t.filter(i=>!n.includes(i)),t.length===0?a.delete(e.name):a.set(e.name,t))}}function b(e,...t){[e,...t].forEach(i=>{a.delete(i)})}function E(){a.clear()}function v(e){return _("Emit",e)}var q="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var R=(e=21)=>{let t="",n=e;for(;n--;)t+=q[Math.random()*64|0];return t};var K=l("dialog"),u=new Map;function V(){let e;do e=R();while(u.has(e));return e}function T(e,t,n){let i=u.get(e);i&&(n?i.resolve(JSON.parse(t)):i.resolve(t),u.delete(e))}function k(e,t){let n=u.get(e);n&&(n.reject(t),u.delete(e))}function c(e,t){return new Promise((n,i)=>{let r=V();t=t||{},t["dialog-id"]=r,u.set(r,{resolve:n,reject:i}),K(e,t).catch(o=>{i(o),u.delete(r)})})}function A(e){return c("Info",e)}function F(e){return c("Warning",e)}function U(e){return c("Error",e)}function z(e){return c("Question",e)}function L(e){return c("OpenFile",e)}function P(e){return c("SaveFile",e)}var Z=l("contextmenu");function $(e,t,n,i){return Z("OpenContextMenu",{id:e,x:t,y:n,data:i})}function y(e){e?window.addEventListener("contextmenu",W):window.removeEventListener("contextmenu",W)}function W(e){D(e.target,e)}function D(e,t){let n=e.getAttribute("data-contextmenu-id");if(n)t.preventDefault(),$(n,t.clientX,t.clientY,e.getAttribute("data-contextmenu-data"));else{let i=e.parentElement;i&&D(i,t)}}window.wails={...ee(-1)};window._wails={dialogCallback:T,dialogErrorCallback:k,dispatchCustomEvent:O};function ee(e){return{Clipboard:{...m},Application:{...x},Log:d,Dialog:{Info:A,Warning:F,Error:U,Question:z,OpenFile:L,SaveFile:P},Events:{Emit:v,On:C,Once:M,OnMultiple:s,Off:b,OffAll:E},Window:S(e)}}console.log("Wails v3.0.0 Debug Mode Enabled");y(!0);})();
+(()=>{var H=Object.defineProperty;var f=(e,t)=>{for(var n in t)H(e,n,{get:t[n],enumerable:!0})};var m={};f(m,{SetText:()=>Q,Text:()=>B});var I=window.location.origin+"/wails/runtime";function h(e,t){let n=new URL(I);return n.searchParams.append("method",e),t&&n.searchParams.append("args",JSON.stringify(t)),new Promise((i,r)=>{fetch(n).then(o=>{if(o.ok)return o.headers.get("content-type")&&o.headers.get("content-type").indexOf("application/json")!==-1?o.json():o.text();r(Error(o.statusText))}).then(o=>i(o)).catch(o=>r(o))})}function l(e,t){return!t||t===-1?function(n,i){return h(e+"."+n,i)}:function(n,i){return i=i||{},i.windowID=t,h(e+"."+n,i)}}var g=l("clipboard");function Q(e){return g("SetText",{text:e})}function B(){return g("Text")}var x={};f(x,{Hide:()=>N,Quit:()=>G,Show:()=>J});var p=l("application");function N(){return p("Hide")}function J(){return p("Show")}function G(){return p("Quit")}var d={};f(d,{Log:()=>Y});var X=l("log");function Y(e){return X("Log",e)}function S(e){let t=l("window",e);return{Center:()=>t("Center"),SetTitle:n=>t("SetTitle",{title:n}),Fullscreen:()=>t("Fullscreen"),UnFullscreen:()=>t("UnFullscreen"),SetSize:(n,i)=>t("SetSize",{width:n,height:i}),Size:()=>t("Size"),SetMaxSize:(n,i)=>t("SetMaxSize",{width:n,height:i}),SetMinSize:(n,i)=>t("SetMinSize",{width:n,height:i}),SetAlwaysOnTop:n=>t("SetAlwaysOnTop",{alwaysOnTop:n}),SetPosition:(n,i)=>t("SetPosition",{x:n,y:i}),Position:()=>t("Position"),Screen:()=>t("Screen"),Hide:()=>t("Hide"),Maximise:()=>t("Maximise"),Show:()=>t("Show"),ToggleMaximise:()=>t("ToggleMaximise"),UnMaximise:()=>t("UnMaximise"),Minimise:()=>t("Minimise"),UnMinimise:()=>t("UnMinimise"),SetBackgroundColour:(n,i,r,o)=>t("SetBackgroundColour",{r:n,g:i,b:r,a:o})}}var _=l("events"),w=class{constructor(t,n,i){this.eventName=t,this.maxCallbacks=i||-1,this.Callback=r=>(n(r),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}};var a=new Map;function s(e,t,n){let i=a.get(e)||[],r=new w(e,t,n);return i.push(r),a.set(e,i),()=>j(r)}function C(e,t){return s(e,t,-1)}function M(e,t){return s(e,t,1)}function j(e){let t=e.eventName,n=a.get(t).filter(i=>i!==e);n.length===0?a.delete(t):a.set(t,n)}function O(e){console.log("dispatching event: ",{event:e});let t=a.get(e.name);if(t){let n=[];t.forEach(i=>{i.Callback(e)&&n.push(i)}),n.length>0&&(t=t.filter(i=>!n.includes(i)),t.length===0?a.delete(e.name):a.set(e.name,t))}}function b(e,...t){[e,...t].forEach(i=>{a.delete(i)})}function E(){a.clear()}function v(e){return _("Emit",e)}var q="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var R=(e=21)=>{let t="",n=e;for(;n--;)t+=q[Math.random()*64|0];return t};var K=l("dialog"),u=new Map;function V(){let e;do e=R();while(u.has(e));return e}function T(e,t,n){let i=u.get(e);i&&(n?i.resolve(JSON.parse(t)):i.resolve(t),u.delete(e))}function k(e,t){let n=u.get(e);n&&(n.reject(t),u.delete(e))}function c(e,t){return new Promise((n,i)=>{let r=V();t=t||{},t["dialog-id"]=r,u.set(r,{resolve:n,reject:i}),K(e,t).catch(o=>{i(o),u.delete(r)})})}function A(e){return c("Info",e)}function F(e){return c("Warning",e)}function U(e){return c("Error",e)}function z(e){return c("Question",e)}function L(e){return c("OpenFile",e)}function P(e){return c("SaveFile",e)}var Z=l("contextmenu");function $(e,t,n,i){return Z("OpenContextMenu",{id:e,x:t,y:n,data:i})}function y(e){e?window.addEventListener("contextmenu",W):window.removeEventListener("contextmenu",W)}function W(e){D(e.target,e)}function D(e,t){let n=e.getAttribute("data-contextmenu");if(n)t.preventDefault(),$(n,t.clientX,t.clientY,e.getAttribute("data-contextmenu-data"));else{let i=e.parentElement;i&&D(i,t)}}window.wails={...ee(-1)};window._wails={dialogCallback:T,dialogErrorCallback:k,dispatchCustomEvent:O};function ee(e){return{Clipboard:{...m},Application:{...x},Log:d,Dialog:{Info:A,Warning:F,Error:U,Question:z,OpenFile:L,SaveFile:P},Events:{Emit:v,On:C,Once:M,OnMultiple:s,Off:b,OffAll:E},Window:S(e)}}console.log("Wails v3.0.0 Debug Mode Enabled");y(!0);})();
diff --git a/v3/internal/runtime/runtime_production_desktop_windows.js b/v3/internal/runtime/runtime_production_desktop_windows.js
index 941982c1b..97f6f5d7a 100644
--- a/v3/internal/runtime/runtime_production_desktop_windows.js
+++ b/v3/internal/runtime/runtime_production_desktop_windows.js
@@ -1 +1 @@
-(()=>{var H=Object.defineProperty;var f=(e,t)=>{for(var n in t)H(e,n,{get:t[n],enumerable:!0})};var m={};f(m,{SetText:()=>Q,Text:()=>B});var I=window.location.origin+"/wails/runtime";function h(e,t){let n=new URL(I);return n.searchParams.append("method",e),t&&n.searchParams.append("args",JSON.stringify(t)),new Promise((i,r)=>{fetch(n).then(o=>{if(o.ok)return o.headers.get("content-type")&&o.headers.get("content-type").indexOf("application/json")!==-1?o.json():o.text();r(Error(o.statusText))}).then(o=>i(o)).catch(o=>r(o))})}function l(e,t){return!t||t===-1?function(n,i){return h(e+"."+n,i)}:function(n,i){return i=i||{},i.windowID=t,h(e+"."+n,i)}}var g=l("clipboard");function Q(e){return g("SetText",{text:e})}function B(){return g("Text")}var x={};f(x,{Hide:()=>N,Quit:()=>G,Show:()=>J});var p=l("application");function N(){return p("Hide")}function J(){return p("Show")}function G(){return p("Quit")}var d={};f(d,{Log:()=>Y});var X=l("log");function Y(e){return X("Log",e)}function S(e){let t=l("window",e);return{Center:()=>t("Center"),SetTitle:n=>t("SetTitle",{title:n}),Fullscreen:()=>t("Fullscreen"),UnFullscreen:()=>t("UnFullscreen"),SetSize:(n,i)=>t("SetSize",{width:n,height:i}),Size:()=>t("Size"),SetMaxSize:(n,i)=>t("SetMaxSize",{width:n,height:i}),SetMinSize:(n,i)=>t("SetMinSize",{width:n,height:i}),SetAlwaysOnTop:n=>t("SetAlwaysOnTop",{alwaysOnTop:n}),SetPosition:(n,i)=>t("SetPosition",{x:n,y:i}),Position:()=>t("Position"),Screen:()=>t("Screen"),Hide:()=>t("Hide"),Maximise:()=>t("Maximise"),Show:()=>t("Show"),ToggleMaximise:()=>t("ToggleMaximise"),UnMaximise:()=>t("UnMaximise"),Minimise:()=>t("Minimise"),UnMinimise:()=>t("UnMinimise"),SetBackgroundColour:(n,i,r,o)=>t("SetBackgroundColour",{r:n,g:i,b:r,a:o})}}var _=l("events"),w=class{constructor(t,n,i){this.eventName=t,this.maxCallbacks=i||-1,this.Callback=r=>(n(r),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}};var a=new Map;function s(e,t,n){let i=a.get(e)||[],r=new w(e,t,n);return i.push(r),a.set(e,i),()=>j(r)}function C(e,t){return s(e,t,-1)}function M(e,t){return s(e,t,1)}function j(e){let t=e.eventName,n=a.get(t).filter(i=>i!==e);n.length===0?a.delete(t):a.set(t,n)}function O(e){console.log("dispatching event: ",{event:e});let t=a.get(e.name);if(t){let n=[];t.forEach(i=>{i.Callback(e)&&n.push(i)}),n.length>0&&(t=t.filter(i=>!n.includes(i)),t.length===0?a.delete(e.name):a.set(e.name,t))}}function b(e,...t){[e,...t].forEach(i=>{a.delete(i)})}function E(){a.clear()}function v(e){return _("Emit",e)}var q="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var R=(e=21)=>{let t="",n=e;for(;n--;)t+=q[Math.random()*64|0];return t};var K=l("dialog"),u=new Map;function V(){let e;do e=R();while(u.has(e));return e}function T(e,t,n){let i=u.get(e);i&&(n?i.resolve(JSON.parse(t)):i.resolve(t),u.delete(e))}function k(e,t){let n=u.get(e);n&&(n.reject(t),u.delete(e))}function c(e,t){return new Promise((n,i)=>{let r=V();t=t||{},t["dialog-id"]=r,u.set(r,{resolve:n,reject:i}),K(e,t).catch(o=>{i(o),u.delete(r)})})}function A(e){return c("Info",e)}function F(e){return c("Warning",e)}function U(e){return c("Error",e)}function z(e){return c("Question",e)}function L(e){return c("OpenFile",e)}function P(e){return c("SaveFile",e)}var Z=l("contextmenu");function $(e,t,n,i){return Z("OpenContextMenu",{id:e,x:t,y:n,data:i})}function y(e){e?window.addEventListener("contextmenu",W):window.removeEventListener("contextmenu",W)}function W(e){D(e.target,e)}function D(e,t){let n=e.getAttribute("data-contextmenu-id");if(n)t.preventDefault(),$(n,t.clientX,t.clientY,e.getAttribute("data-contextmenu-data"));else{let i=e.parentElement;i&&D(i,t)}}window.wails={...ee(-1)};window._wails={dialogCallback:T,dialogErrorCallback:k,dispatchCustomEvent:O};function ee(e){return{Clipboard:{...m},Application:{...x},Log:d,Dialog:{Info:A,Warning:F,Error:U,Question:z,OpenFile:L,SaveFile:P},Events:{Emit:v,On:C,Once:M,OnMultiple:s,Off:b,OffAll:E},Window:S(e)}}console.log("Wails v3.0.0 Debug Mode Enabled");y(!0);})();
+(()=>{var H=Object.defineProperty;var f=(e,t)=>{for(var n in t)H(e,n,{get:t[n],enumerable:!0})};var m={};f(m,{SetText:()=>Q,Text:()=>B});var I=window.location.origin+"/wails/runtime";function h(e,t){let n=new URL(I);return n.searchParams.append("method",e),t&&n.searchParams.append("args",JSON.stringify(t)),new Promise((i,r)=>{fetch(n).then(o=>{if(o.ok)return o.headers.get("content-type")&&o.headers.get("content-type").indexOf("application/json")!==-1?o.json():o.text();r(Error(o.statusText))}).then(o=>i(o)).catch(o=>r(o))})}function l(e,t){return!t||t===-1?function(n,i){return h(e+"."+n,i)}:function(n,i){return i=i||{},i.windowID=t,h(e+"."+n,i)}}var g=l("clipboard");function Q(e){return g("SetText",{text:e})}function B(){return g("Text")}var x={};f(x,{Hide:()=>N,Quit:()=>G,Show:()=>J});var p=l("application");function N(){return p("Hide")}function J(){return p("Show")}function G(){return p("Quit")}var d={};f(d,{Log:()=>Y});var X=l("log");function Y(e){return X("Log",e)}function S(e){let t=l("window",e);return{Center:()=>t("Center"),SetTitle:n=>t("SetTitle",{title:n}),Fullscreen:()=>t("Fullscreen"),UnFullscreen:()=>t("UnFullscreen"),SetSize:(n,i)=>t("SetSize",{width:n,height:i}),Size:()=>t("Size"),SetMaxSize:(n,i)=>t("SetMaxSize",{width:n,height:i}),SetMinSize:(n,i)=>t("SetMinSize",{width:n,height:i}),SetAlwaysOnTop:n=>t("SetAlwaysOnTop",{alwaysOnTop:n}),SetPosition:(n,i)=>t("SetPosition",{x:n,y:i}),Position:()=>t("Position"),Screen:()=>t("Screen"),Hide:()=>t("Hide"),Maximise:()=>t("Maximise"),Show:()=>t("Show"),ToggleMaximise:()=>t("ToggleMaximise"),UnMaximise:()=>t("UnMaximise"),Minimise:()=>t("Minimise"),UnMinimise:()=>t("UnMinimise"),SetBackgroundColour:(n,i,r,o)=>t("SetBackgroundColour",{r:n,g:i,b:r,a:o})}}var _=l("events"),w=class{constructor(t,n,i){this.eventName=t,this.maxCallbacks=i||-1,this.Callback=r=>(n(r),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}};var a=new Map;function s(e,t,n){let i=a.get(e)||[],r=new w(e,t,n);return i.push(r),a.set(e,i),()=>j(r)}function C(e,t){return s(e,t,-1)}function M(e,t){return s(e,t,1)}function j(e){let t=e.eventName,n=a.get(t).filter(i=>i!==e);n.length===0?a.delete(t):a.set(t,n)}function O(e){console.log("dispatching event: ",{event:e});let t=a.get(e.name);if(t){let n=[];t.forEach(i=>{i.Callback(e)&&n.push(i)}),n.length>0&&(t=t.filter(i=>!n.includes(i)),t.length===0?a.delete(e.name):a.set(e.name,t))}}function b(e,...t){[e,...t].forEach(i=>{a.delete(i)})}function E(){a.clear()}function v(e){return _("Emit",e)}var q="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var R=(e=21)=>{let t="",n=e;for(;n--;)t+=q[Math.random()*64|0];return t};var K=l("dialog"),u=new Map;function V(){let e;do e=R();while(u.has(e));return e}function T(e,t,n){let i=u.get(e);i&&(n?i.resolve(JSON.parse(t)):i.resolve(t),u.delete(e))}function k(e,t){let n=u.get(e);n&&(n.reject(t),u.delete(e))}function c(e,t){return new Promise((n,i)=>{let r=V();t=t||{},t["dialog-id"]=r,u.set(r,{resolve:n,reject:i}),K(e,t).catch(o=>{i(o),u.delete(r)})})}function A(e){return c("Info",e)}function F(e){return c("Warning",e)}function U(e){return c("Error",e)}function z(e){return c("Question",e)}function L(e){return c("OpenFile",e)}function P(e){return c("SaveFile",e)}var Z=l("contextmenu");function $(e,t,n,i){return Z("OpenContextMenu",{id:e,x:t,y:n,data:i})}function y(e){e?window.addEventListener("contextmenu",W):window.removeEventListener("contextmenu",W)}function W(e){D(e.target,e)}function D(e,t){let n=e.getAttribute("data-contextmenu");if(n)t.preventDefault(),$(n,t.clientX,t.clientY,e.getAttribute("data-contextmenu-data"));else{let i=e.parentElement;i&&D(i,t)}}window.wails={...ee(-1)};window._wails={dialogCallback:T,dialogErrorCallback:k,dispatchCustomEvent:O};function ee(e){return{Clipboard:{...m},Application:{...x},Log:d,Dialog:{Info:A,Warning:F,Error:U,Question:z,OpenFile:L,SaveFile:P},Events:{Emit:v,On:C,Once:M,OnMultiple:s,Off:b,OffAll:E},Window:S(e)}}console.log("Wails v3.0.0 Debug Mode Enabled");y(!0);})();