December 31, 2000 - The Netscape 6 Event Model
December 31, 2000|
The Netscape 6 Event Model
Tips: December 2000
Yehuda Shiran, Ph.D.
windowobject to the target object. Any object in the hierarchy can capture the event before it reaches the target object. Events in Internet Explorer propagates in the opposite direction. They bubble from the target object towards the browser window object. Any object can process the event on its way up. Netscape 6 supports both directions. The event dives in from the browser
windowobject to the target object and then bubbles back to the
windowobject. You can specify whether you want to intercept the event during its dive (capture phase) or its ascend (bubbling phase).
Another advantage of Netscape 6 event model is the ability to specify more than one actions per an event type. Both Navigator and Internet Explorer support only one action per an event type. When you wanted to invoke the function
buttonClicked() whenever the a button is clicked, you wrote its event handler as:
But what if you want to specify another function to invoke? That's where Netscape 6 kicks in.
onClick = buttonClicked();
Learn more about the event model in Netscape Navigator 4.x in Column 9, The Navigator Event Model. Learn more about the event model in Internet Explorer in Column 10, The Internet Explorer Event Model.