save = function (workspace) {
  const data = Blockly.serialization.workspaces.save(workspace);
  window.localStorage?.setItem(storageKey, JSON.stringify(data));
}
Saves the state of the workspace to browser's local storage.
@param {Blockly.Workspace} workspace Blockly workspace to save.