importModule function

JSPromise<JSObject> importModule(
  1. JSAny moduleName
)

Dynamically imports a JavaScript module with the given moduleName using the JavaScript 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(JSAny moduleName);