Closed IdahoEv closed 12 years ago
Feature request for useful debugging tool: ask NinjaScript to output all symbols for which there are registered handlers.
For example, if I have:
Ninja.respondToJson({ alert: function(msg) { ..stuff ..}, notice: function(msg) { .. stuff .. }})
defined in one file, and
Ninja.respondToJson({ recommendation: function(recco) {.. stuff ..} })
in a second file, it would be nice to have NS be able to say:
Registered JSON Handlers: 'alert', 'notice', 'recommendation'.
As of the most recent commit, try NinjaScript.jsonDispatcher.inspect() - result will be a list of all the paths into the JSON data that event handlers are registered on.
Feature request for useful debugging tool: ask NinjaScript to output all symbols for which there are registered handlers.
For example, if I have:
defined in one file, and
in a second file, it would be nice to have NS be able to say:
Registered JSON Handlers: 'alert', 'notice', 'recommendation'.