Constructor
new BindingData(data)
Properties:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the content to be wrapped by serde.BindingData Properties
|
Converts a data object into a serde.BindingData.
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | the content to be wrapped by serde.BindingData Properties
|
Members
callbackFn
Serialize a javascript function into a string so that it can survive a reload.
Methods
fromFlag(flaggable) → {BindingData}
Retrieves external binding data, allowing ink's FFI external bindings to be reregistered when a story needs to resume.
Parameters:
| Name | Type | Description |
|---|---|---|
flaggable |
FlaggableObject | the object that implements foundry's setFlag interface. |
Returns:
the external binding stored in a flag.
- Type
- BindingData
toFlag(flaggable)
Serializes external binding data into a flag for a foundry object. This is necessary because external bindings created by macros or through console commands do not persist when foundry is rebooted or refreshed.
Parameters:
| Name | Type | Description |
|---|---|---|
flaggable |
FlaggableObject | the object that implements foundry's setFlag interface. |