(Sorry if it was queried previously, I didnt found it)
I used to check if an object and method exists and call it in this way:
obj && obj.method && obj.method()
But, I suspect that some cases this are making some troubles on IE..
Do I need check it using typeof undefined/function/object
?
typeof obj === 'object' && typeof obj.method === 'function' && obj.method()
I would like to know what is the securest and clearest style to code it.