@wailsio/runtime 3.0.0-alpha.4 → 3.0.0-alpha.5

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.
package/contextmenu.js CHANGED
@@ -11,6 +11,7 @@ The electron alternative for Go
11
11
  /* jshint esversion: 9 */
12
12
 
13
13
  import {newRuntimeCallerWithID, objectNames} from "./runtime";
14
+ import {IsDebug} from "./system";
14
15
 
15
16
  const call = newRuntimeCallerWithID(objectNames.ContextMenu, '');
16
17
  const ContextMenuOpen = 0;
@@ -47,8 +48,9 @@ function contextMenuHandler(event) {
47
48
  This rule is inherited like normal CSS rules, so nesting works as expected
48
49
  */
49
50
  function processDefaultContextMenu(event) {
51
+
50
52
  // Debug builds always show the menu
51
- if (DEBUG) {
53
+ if (IsDebug()) {
52
54
  return;
53
55
  }
54
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wailsio/runtime",
3
- "version": "3.0.0-alpha.4",
3
+ "version": "3.0.0-alpha.5",
4
4
  "description": "Wails Runtime",
5
5
  "main": "index.js",
6
6
  "repository": {
package/system.js CHANGED
@@ -116,3 +116,7 @@ export function IsARM() {
116
116
  export function IsARM64() {
117
117
  return environmentCache.Arch === "arm64";
118
118
  }
119
+
120
+ export function IsDebug() {
121
+ return environmentCache.Debug === true;
122
+ }