Velocity API: WLEvent.onExitScope()

Version 2

    Return To Index

    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);
    ParameterDescriptionTypeRequiredNotes
    funcRefThe function triggered when the key event is triggered.FunctionRequired
    scopeThe type of scope this exit handler is associated with.StringOptionalIf 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

    /* 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");
       }
    );