Unload event

This event gets executed upon the script being unloaded.

This event will be called upon the script unload / finalization of a Script object. This event does not have any parameters.

script.handle("onUnload", function () {
    // finalize (unregister) variables / hooks / modules / commands here
}

Last updated