GuestModule
Default IModule implementation backed by a static parameters object. Hosts can instantiate this directly or use the createGuestModule factory for a terser API.
Extends
ScriptingObject
Implements
IModule
Accessors
id
Get Signature
get id(): string;
get unique id of the scripting object
Returns
string
Implementation of
IModule.id
Inherited from
ScriptingObject.id
objectType
Get Signature
get objectType(): string;
get type of the scripting object
Returns
string
Implementation of
IModule.objectType
Inherited from
ScriptingObject.objectType
Constructors
Constructor
new GuestModule(guestId: string, params?: HostProvidedParams): GuestModule;
Parameters
guestId
string
params?
HostProvidedParams = {}
Returns
GuestModule
Overrides
ScriptingObject.constructor
Methods
_setUnloadHandler()
_setUnloadHandler(handler: () => Promise<void>): void;
Bind the teardown logic that runs when the guest calls unload(). Prefixed with _ so SSF's for…in discovery skips it. The App Bridge auto-binds this in openApp().
Parameters
handler
() => Promise<void>
Returns
void
getCapabilities()
getCapabilities(): Promise<Record<string, unknown>>;
Returns
Promise<Record<string, unknown>>
Implementation of
IModule.getCapabilities
getParameters()
getParameters(): Promise<ModuleParameters>;
Returns
Promise<ModuleParameters>
Implementation of
IModule.getParameters
log()
log(message: string | LogMessage, logLevel: "DEBUG" | "INFO" | "AUDIT" | "WARN" | "ERROR" | "FATAL"): Promise<void>;
Parameters
message
string | LogMessage
logLevel
"DEBUG" | "INFO" | "AUDIT" | "WARN" | "ERROR" | "FATAL"
Returns
Promise<void>
Implementation of
IModule.log
unload()
unload(): Promise<void>;
Returns
Promise<void>
Implementation of
IModule.unload
Properties
_dispose
_dispose: () => void;
dispose the scripting object
Returns
void
Implementation of
IModule._dispose
Inherited from
ScriptingObject._dispose
_toJSON
_toJSON: () => RemotingScriptingObject;
transform the scripting object to a format suitable for transmitting over window.postMessage
Returns
RemotingScriptingObject
marshalled scripting object
Implementation of
IModule._toJSON
Inherited from
ScriptingObject._toJSON
Close
readonly Close: Event<Events>;
event fired when the module to be closed
Use ModuleCloseListener to handle this event
Implementation of
IModule.Close
dispose
dispose: () => void;
dispose the scripting object
Returns
void
Inherited from
ScriptingObject.dispose
Unloading
readonly Unloading: Event<Events>;
event fired when the module is unloading
Use ModuleUnLoadingListener to handle this event
Implementation of
IModule.Unloading