captureEvents and the Bitmask
browser wars 1997 deadIn Netscape 4 events were a subscription service: no captureEvents call with the right bitmask, no mousemove for you.
In 2026: Dead. The rival IE model needed no registration at all, the DOM standard followed suit, and captureEvents lingered as a do-nothing stub for years before browsers deleted even the stub. Every old mouse trail script starts with this incantation, which is why so many of them begin with if (document.layers).
Where it came from: Netscape Navigator 4 event model, JavaScript 1.2, 1997. MDN ↗
<script language="JavaScript">
// Netscape 4: a page had to ASK to see events, with a bitmask,
// before any of its handlers would fire.
if (document.captureEvents) {
document.captureEvents(Event.MOUSEMOVE | Event.CLICK);
}
document.onmousemove = function (e) {
window.status = "Mouse at " + e.pageX + "," + e.pageY;
};
document.write(document.captureEvents
? "<p>captureEvents still exists here.</p>"
: "<p>captureEvents is gone. Handlers just work now.</p>");
</script>