event stoppropagation not working
// works like charm
function DownloadAsset(AssetId, e) {
if (!e) var e = window.event
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
// your ajax call
$.ajax({....})
}
event stoppropagation not working
// works like charm
function DownloadAsset(AssetId, e) {
if (!e) var e = window.event
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
// your ajax call
$.ajax({....})
}
stopimmediatepropagation vs stoppropagation
<!---- stopImmediatePropagation() vs stopPropagation() ----------------->
`stopPropagation` allows other event handlers on the SAME ELEMENT
on the SAME EVENT to be executed, while `stopImmediatePropagation`
prevents this.
<script>
el.addEventListener( "click", e => e.stopImmediatePropagation() )
el.addEventListener( "click", e => console.log("This will not run.") )
</script>
<!----------------- stopImmediatePropagation() vs stopPropagation() ---->
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us