summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests/unit/es6module_dynamic_import.js
blob: 0b73a3daf44ee36325e0b6089382cbe70f4d4981 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { getCounter, setCounter } from "./es6module_dynamic_import_static.js";

let resolve;

export const result = new Promise(r => { resolve = r; });

import("./es6module_dynamic_import2.js").then(ns => {
  resolve(ns);
});

export function doImport() {
  return import("./es6module_dynamic_import3.js");
}

export function callGetCounter() {
  return getCounter();
}

export function callSetCounter(v) {
  setCounter(v);
}

export function doImportStatic() {
  return import("./es6module_dynamic_import_static.js");
}