Velocity API: WLEvent.cleanRegistry()

Version 1

    Return To Index

    WLEvent.cleanRegistry()

    Overview

    Removes all registered functions for a named scope.
    To remove a specific function for a scope, see WLEvent.off.

    Format

     

    var scopeCleaned = WLEvent.cleanRegistry(scope);
    ParameterDescriptionTypeRequiredNotes
    scopeThe scope being cleaned.StringRequiredThe global scope cannot be cleaned.
    scopeCleanedThe return value. True if successful.BooleanReturnReturns false if the scope is 'global', otherwise returns true. Does not exit the scope.

     

    Example

    /* Removes all callback functions associated with the 
    * "mySpecial" scope.
    */
      
    WLEvent.cleanRegistry("mySpecial");