Im working on a Test AB on Adobe Target.
I have this code that works perfect on chrome but When i try it on Internet explorer I get an error.
MY CODE:
function hashHandler(eventData) {
if (eventData.newURL.includes('#mypage-example')) {
console.log('I am on my page');
funcionCarga();
}
}
window.addEventListener('hashchange', hashHandler, false);
ERROR: Object doesn't support property or method 'includes'
I try with indexOf but i get another error: Unable to get property 'indexOf' of undefined or null reference
I can not use polymer because I don´t have access to the original code. Is there anyway I can fix this code so it could work on Internet explorer?