@wailsio/runtime 3.0.0-alpha.39 → 3.0.0-alpha.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/wml.js +7 -7
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wailsio/runtime",
3
3
  "type": "module",
4
- "version": "3.0.0-alpha.39",
4
+ "version": "3.0.0-alpha.40",
5
5
  "description": "Wails Runtime",
6
6
  "types": "types/index.d.ts",
7
7
  "exports": {
package/src/wml.js CHANGED
@@ -60,10 +60,10 @@ function onWMLTriggered(ev) {
60
60
  if (choice !== "Yes")
61
61
  return;
62
62
 
63
- const eventType = element.getAttribute('wml-event');
64
- const targetWindow = element.getAttribute('wml-target-window') || "";
65
- const windowMethod = element.getAttribute('wml-window');
66
- const url = element.getAttribute('wml-openurl');
63
+ const eventType = element.getAttribute('data-wml-event');
64
+ const targetWindow = element.getAttribute('data-wml-target-window') || "";
65
+ const windowMethod = element.getAttribute('data-wml-window');
66
+ const url = element.getAttribute('data-wml-openURL');
67
67
 
68
68
  if (eventType !== null)
69
69
  sendEvent(eventType);
@@ -73,7 +73,7 @@ function onWMLTriggered(ev) {
73
73
  void OpenURL(url);
74
74
  }
75
75
 
76
- const confirm = element.getAttribute('wml-confirm');
76
+ const confirm = element.getAttribute('data-wml-confirm');
77
77
 
78
78
  if (confirm) {
79
79
  Question({
@@ -218,7 +218,7 @@ const triggerRegistry = canAbortListeners() ? new AbortControllerRegistry() : ne
218
218
  */
219
219
  function addWMLListeners(element) {
220
220
  const triggerRegExp = /\S+/g;
221
- const triggerAttr = (element.getAttribute('wml-trigger') || "click");
221
+ const triggerAttr = (element.getAttribute('data-wml-trigger') || "click");
222
222
  const triggers = [];
223
223
 
224
224
  let match;
@@ -246,5 +246,5 @@ export function Enable() {
246
246
  */
247
247
  export function Reload() {
248
248
  triggerRegistry.reset();
249
- document.body.querySelectorAll('[wml-event], [wml-window], [wml-openurl]').forEach(addWMLListeners);
249
+ document.body.querySelectorAll('[data-wml-event], [data-wml-window], [data-wml-openURL]').forEach(addWMLListeners);
250
250
  }