diff --git a/unlisten.md b/unlisten.md new file mode 100644 index 0000000..ce6a600 --- /dev/null +++ b/unlisten.md @@ -0,0 +1,14 @@ +unlisten(messageName, *bundleName, handlerFunc) → {boolean} +Removes a listener for a message. +Messages are namespaced by bundle. To remove a listener to a message in another bundle's namespace, provide it as the second argument. +#Parameters +Name Type Attributes Default Description +messageName string The name of the message. +bundleName string CURR_BNDL The bundle namespace to in which to listen for this message +handlerFunc function A reference to a handler function added as a listener to this message via listenFor. + +#Example +nodecg.unlisten('printMessage', someFunctionName); +Removing a listener from a message in another bundle's namespace: +nodecg.unlisten('printMessage', 'another-bundle', someFunctionName); +