DriftScript bindings · function
bindModule
Give a loaded module its host, and refuse in words when the host cannot satisfy it.
Explained in Setting up scripts.
function bindModule(module: DriftModule, services: HostServices): BindResultimport { bindModule } from '@driftengine/script';Parameters
| Parameter | Type | Description |
|---|---|---|
module | DriftModule | |
services | HostServices |
In depth
Checked against __drift.requires before anything is called, so a missing service is reported at
bind time naming the module — rather than at the first capability call, deep in a frame, as an
undefined property.