@wailsio/runtime 3.0.0-alpha.29 → 3.0.0-alpha.30
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/package.json +3 -2
- package/src/event_types.js +1 -0
- package/src/index.js +14 -2
- package/src/window.js +1 -1
- package/types/event_types.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wailsio/runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-alpha.
|
|
4
|
+
"version": "3.0.0-alpha.30",
|
|
5
5
|
"description": "Wails Runtime",
|
|
6
|
+
"types": "types/index.d.ts",
|
|
6
7
|
"exports": {
|
|
7
8
|
".": {
|
|
8
9
|
"types": "./types/index.d.ts",
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
"build:types": "npx -p typescript tsc src/index.js --declaration --allowJs --emitDeclarationOnly --outDir types",
|
|
20
21
|
"postbuild:types": "wails3 task generate:events",
|
|
21
22
|
"build:docs": "npx typedoc ./src/index.js",
|
|
22
|
-
"build:docs:md": "npx typedoc --plugin typedoc-plugin-markdown --namedAnchors true --hideBreadcrumbs true --out ../../../../../../
|
|
23
|
+
"build:docs:md": "npx typedoc --plugin typedoc-plugin-markdown --namedAnchors true --hideBreadcrumbs true --out ../../../../../../old_mkdocs/docs/en/api/js ./src/index.js"
|
|
23
24
|
},
|
|
24
25
|
"author": "The Wails Team",
|
|
25
26
|
"license": "MIT",
|
package/src/event_types.js
CHANGED
package/src/index.js
CHANGED
|
@@ -43,6 +43,18 @@ export {
|
|
|
43
43
|
WML
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
let initialised = false;
|
|
47
|
+
export function init() {
|
|
48
|
+
window._wails.invoke = System.invoke;
|
|
49
|
+
System.invoke("wails:runtime:ready");
|
|
50
|
+
initialised = true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
window.addEventListener("load", () => {
|
|
54
|
+
if (!initialised) {
|
|
55
|
+
init();
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
46
59
|
// Notify backend
|
|
47
|
-
|
|
48
|
-
System.invoke("wails:runtime:ready");
|
|
60
|
+
|
package/src/window.js
CHANGED