WLEvent.exitScope()
Overview
Exits a scope by removing it from the scope stack and then discarding the events associated with the scope. Triggers the “exitScope” event after event handlers from the current scope are removed.
Added in version 1.2.0
See Also
Format
var scopeExited = WLEvent.exitScope(scope);
Parameter | Description | Type | Required | Notes |
---|---|---|---|---|
scope | The scope to exit. | String | Required | |
scopeExited | The return value. True if the scope was successfully exited. | Boolean | Return | Returns false if scope is “global”, otherwise returns true. |
Example
Copy
/* Removes all event handlers for the "mySpecial" scope.
*/
WLEvent.exitScope("mySpecial");