check if function exist browser compatability code example
Example: js check if function exists
if (typeof yourFunctionName == 'function') {
yourFunctionName();
}
if (typeof yourFunctionName == 'function') {
yourFunctionName();
}