I checkout blockly v9.2.1 in /core/events/utils.ts code
/**
* Sets whether events should be added to the undo stack.
*
* @param newValue True if events should be added to the undo stack.
* @alias Blockly.Events.utils.setRecordUndo
*/
export function setRecordUndo(newValue: boolean) {
recordUndo = newValue;
}
so I want to use Blockly.Events.utils.setRecordUndo(false) at
codepen.io which use umd way,but it will throw error as bellows:
pen.js:3814 Uncaught TypeError: Cannot read properties of undefined (reading 'setRecordUndo')
at BlockSvg$$module$build$src$core$block_svg.updateShape_ (pen.js:3814:28)
at BlockSvg$$module$build$src$core$block_svg.setProcedureParameters_ (pen.js:3495:10)
at BlockSvg$$module$build$src$core$block_svg.domToMutation (pen.js:3928:10)
at HTMLInputElement.<anonymous> (pen.js:4439:20)
at HTMLInputElement.dispatch (jquery.min.js:2:40035)
at v.handle (jquery.min.js:2:38006)
The reason why I want to use this code is I want customize some action in redo stack.any advice is preferred,thanks.