I have added an alert to an newly created element to content script of Chrome extension as bellows;
myBtn.onclick = function() { alert('blah'); };
I have used following CSS to put the button on top of other content.
.sbutton img{
width: 80px;
height: 30px;
z-index:1000;
position:fixed;
}
I'm getting the alert 'blah' when clicked on element.
But the problem is, some other element below my element, is also getting clicked in the same time and the tab navigates to another url.
Is there any method to stop further execution of mouse click, once the alert is executed?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…