I'm implementing a bookmark feature in a web application. Works fine in FF (Chrome does not support it), but it throws an error in IE8 and does not even work in IE9 & IE10.
This is the code (it's inside a click handler function, so pretty straight forward):
if(window.sidebar) {
window.sidebar.addPanel("EXOP - GRD", $(this).data('href'), "");
} else if(window.external && window.external.AddFavorite) {
window.external.AddFavorite($(this).data('href'), "EXOP - GRD");
} else if(window.opera) {
$(this).attr({
href:$(this).data('href'),
title:"EXOP - GRD",
rel:"sidebar"
})
} else {
console.log("Bookmark Action not supported");
return false;
}
But IE8 breaks on line 3 pointing to the if
with the error Object doesnt support This Property or Method
. What???
Also this stuff should work in IE9 & 10, shouldn't it?
Any help would be really appreciated.