Module boa_engine::module

source ·
Expand description

Boa’s implementation of the ECMAScript’s module system.

This module contains the Module type, which represents an Abstract Module Record, a ModuleLoader trait for custom module loader implementations, and SimpleModuleLoader, the default ModuleLoader for Context which can be used for most simple usecases.

Every module roughly follows the same lifecycle:

The ModuleLoader trait allows customizing the “load” step on the lifecycle of a module, which allows doing things like fetching modules from urls, having multiple “modpaths” from where to import modules, or using Rust futures to avoid blocking the main thread on loads.

More information:

Structs§

Enums§

  • The referrer from which a load request of a module originates.

Traits§