Blockly.serialization.ISerializer. ISerializer
Serializes and deserializes a plugin or system.
Property
priority
number
A priority value used to determine the order of deserializing state. More positive priorities are deserialized before less positive priorities. Eg if you have priorities (0, -10, 10, 100) the order of deserialiation will be (100, 10, 0, -10). If two serializers have the same priority, they are deserialized in an arbitrary order relative to each other.
Methods
clear
clear(workspace)
Clears the state of the plugin or system.
Parameter |
|
---|---|
workspace |
The workspace the system to clear the state of is associated with. Value must not be null. |
load
load(state, workspace)
Loads the state of the plugin or system.
Parameter |
|
---|---|
state |
unknown The state of the system to deserialize. This will always be non-null. |
workspace |
The workspace the system to deserialize is associated with. Value must not be null. |
save
save(workspace) returns unknown
Saves the state of the plugin or system.
Parameter |
|
---|---|
workspace |
The workspace the system to serialize is associated with. Value must not be null. |
- Returns
-
unknown
A JS object containing the system's state, or null if there is no state to record.