blockly > Field > saveLegacyState

Field.saveLegacyState() method

Returns a stringified version of the XML state, if it should be used. Otherwise this returns null, to signal the field should use its own serialization.

Signature:

protected saveLegacyState(callingClass: FieldProto): string | null;

Parameters

Parameter Type Description
callingClass FieldProto The class calling this method. Used to see if this has overridden any relevant hooks.

Returns:

string | null

The stringified version of the XML state, or null.