-
• #2
That sounds like a neat idea... You might be hitting the issue that if
Bangle.#ontouch
has one event handler it's stored just as the handler to save space, but if you have more than one it's an array - so you could instead check if it's an array first?
While trying to find methods using a lot of time I thought of automatically wrapping all functions in an object to get some statistics. I came up with this: https://gist.github.com/halemmerich/a2e90fc2ea1aefd2bed8a20d3fb3bdf0
This does not seem to work for things like
Bangle.#ontouch
. While I can doObject.keys(Bangle.["#ontouch"]).length
from the IDE terminal to detect if there is an array of functions in there, the code in the gist line 9 does not seem get the array. Generally the recursion path is not taken, as if everything is type function.Ideas anyone?