importModule function

JSPromise<JSObject> importModule(
  1. String moduleName
)

Call to dynamically import a JS module with the given moduleName using the JS import() syntax.

See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import for more details.

Returns a JSPromise that resolves to a JSObject that's the module namespace object.

Implementation

external JSPromise<JSObject> importModule(String moduleName);