topical media & game development
#javascript-code-06-stopBubble.js / js
function stopBubble(e) {
// If an event object is provided, then this is a non-IE browser
if ( e )
// and therefore it supports the W3C stopPropagation() method
e.stopPropagation();
else
// Otherwise, we need to use the Internet Explorer way of cancelling event bubbling
window.event.cancelBubble = true;
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.