[null,null,["最后更新时间 (UTC):2024-09-09。"],[[["Blockly icons can optionally save their state for persistence, requiring the implementation of the `ISerializable` interface and registration."],["Icon state is stored within the `icons` property of a block's state in JSON format, utilizing the `saveState` and `loadState` methods."],["The `saveState` method includes an optional `doFullSerialization` parameter to handle cases where the referenced data model isn't available during deserialization, for instance when loading or copying blocks."],["To load saved icon state, implement the `loadState` method which receives the JSON data previously saved by `saveState`."],["For the serialization system to instantiate your custom icon, register it using its corresponding `IconType`, ensuring consistency with the `getType` method's return value."]]],["Icons that require saving state must implement the `ISerializable` interface and be registered. To save state, the `saveState` method returns JSON data, which is then used by the `loadState` method to restore the icon's state. The `saveState` method takes an optional `doFullSerialization` parameter for serializing referenced state. The state is stored under the `icons` property of the block's state. Icon classes must be registered using the same string as their `getType` method.\n"]]