I'm trying to intercept a click on a link (e.g. LINK) in the mobile version of Firefox aka Fennec.
My current looks something like this:
var appcontent = document.getElementById("appcontent"); // Firefox
if (!appcontent) {
appcontent = event.currentTarget; // Fennec
}
appcontent.addEventListener("click", function(event) {
if(event.target.tagName.toLowerCase() == "a"){
alert("click detected" + );
}
}, true);
Apparently the event.target.tagName never contains the a tag, but other tags like notificationbox and button. I need this to differentiate javascript buttons from clicks.
Anyone knows what i'm doing wrong?