spacer
Yehuda Shiran December 31, 2000
The Netscape 6 Event Model
Tips: December 2000

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

Netscape 6 has a unique event model. It combines the Navigator event model with that of the Internet Explorer. Events in Navigator propagates downwards from the browser window object 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 window object to the target object and then bubbles back to the window object. 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:

onClick = buttonClicked();
But what if you want to specify another function to invoke? That's where Netscape 6 kicks in.

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.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint