aboutsummaryrefslogtreecommitdiff
path: root/ext/js/background
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/background')
-rw-r--r--ext/js/background/background-main.js9
-rw-r--r--ext/js/background/offscreen-main.js7
2 files changed, 11 insertions, 5 deletions
diff --git a/ext/js/background/background-main.js b/ext/js/background/background-main.js
index 8e32a53f..29c256d3 100644
--- a/ext/js/background/background-main.js
+++ b/ext/js/background/background-main.js
@@ -19,9 +19,12 @@
import {yomitan} from '../yomitan.js';
import {Backend} from './backend.js';
-(() => {
+/** Entry point. */
+async function main() {
yomitan.prepare(true);
const backend = new Backend();
- backend.prepare();
-})();
+ await backend.prepare();
+}
+
+main();
diff --git a/ext/js/background/offscreen-main.js b/ext/js/background/offscreen-main.js
index dcbf978f..f85908bd 100644
--- a/ext/js/background/offscreen-main.js
+++ b/ext/js/background/offscreen-main.js
@@ -18,6 +18,9 @@
import {Offscreen} from './offscreen.js';
-(() => {
+/** Entry point. */
+async function main() {
new Offscreen();
-})();
+}
+
+await main();