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);

Parameter Description Type Required Notes
scope The scope being cleaned. String Required The global scope cannot be cleaned.
scopeCleaned The return value. True if successful. Boolean Return Returns false if the scope is 'global', otherwise returns true. Does not exit the scope.

Example

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