Hi, I am defining macros/widgets in an external js file (with
SugarCube.Macro.Add(...) However I noticed that if I refresh the page, these widgets are not being reloaded and the rendering of the passage fails. It says that the Macro does not exist.
This does not seem desirable. How can I make sure that the widgets are being reloaded when I hit refresh? I tried hooking up the
:passageInit event but it does not fire on page refresh.
I do not recommend using the
SugarCube debugging interface for anything other than debugging.
As for the event, I don’t think that’s going to help you, but the name is
:passageinit—spelling matters, including casing.