Function in script needs to generate NO history states at all
Is it possible using either javascript or scriptlistener way to prevent history states from being generated?
I'm writing a configurator 4 html extension and this part puts a guide on the canvas with the coordinate defined from a html text box - once the entry is updated the previous guide is removed and the new one added. I'm using scriptlistener code to create the guide as it seems to be the only way to force guides to toggle on to visible. Because this can be run an arbitrary number of times it would be far better if it didn't generate a history state every time it's updated. Is there a way to tweak the scriptlistener code to prevent history states? Simply reverting to a previous history state doesn't work as there may be other steps taken in between function calls, and removing the last index of document.guides doesn't work as other guides may be added in between also.
Currently I'm wrapping the update into a function and calling it through document.suspendHistory but it would be far better if it could be done 'silently' as far as the end user is concerned. I appreciate any thoughts, thanks
