in the documentation hypeDocument.functions() is described to be an array of custom hypefunctions.
Instead it seems to be a object with key = functionname and value = function.
My problem:
I want to iterate thru the object to find a specific key and then run its associated function.
Can’t get it to work without eval-usage. Guess i’m missing something
Codesnippet:
if(myIndex != -1)
{
for (var key in hypeFunctions) {
if(key === myFunctions[myIndex])
{
eval('hypeDocument.functions().' + key + '(hypeDocument, element, event)')//which works as expected, but couldn't be the propper way ...
}
}
}