WLEvent.onExitScope()

Overview

Set a function to be run when a scope is exited.

Added in version 1.2.104

Format

WLEvent.onExitScope(funcRef, scope);

Parameter Description Type Required Notes
funcRef The function triggered when the key event is triggered. Function Required
scope The type of scope this exit handler is associated with. String Optional If no value is provided, the current scope is used. Returns false if the scope doesn't exist, true if the exit handler was successfully registered.

Example

Copy
/* This is an example of the WLEvent.onExitScope script API.
 * Triggers an anonymous function when the current scope is exited.
 */
 
 WLEvent.onExitScope(function () { Logger.debug("The scope was exited"); });