Velocity API: WLEvent.enterScope()

Version 1

    Return To Index



    Enters a scope, adds it to the scope stack, and calls all registered functions for that scope. An event handler list associated with that scope is prepared. The new scope is added to the top of the scope stack. New event handlers will default to being registered with the scope that is on top of the scope stack. Triggers the “EnterScope” event before invoking any of the scope's registered functions.

    You may have more than one custom scope at a time.

    Added in version 1.2.0

    See Also
    • WLEvent.exitScope()



    var scopeEntered = WLEvent.enterScope(scope);
    scopeThe scope being entered.StringRequiredSee WLEvent.registerScope() Velocity Scopes
    scopeEnteredThe return value. True if the scope was successfully entered.BooleanReturn



    /* Invokes all registered functions associated with the 
    * "mySpecial" scope.