Events are the main components of Javascript. They help the user interact and provide status on changes made by those intractions. They are susually used to receiver user input. You must subscribe to an event to execute the actions assigned to that event.
1. Event is created and it can be exposed, published or madeto handle any related events.
2. When objects are used they are assigned handlers. They allow subscription to the objects events.
3. Event subscribers are notified by using handler functions within the object.
4. When an event triggers the object is passed to a event handling function that provides information about the event.
Child elements that trigger events within the parent are passed down the DOM hierarchy.
CAPTURING - passing down elements in the DOM.
BUBBLING - After event reaches the desired trigger it goes back up the DOM.
Event propagation can be canceled.
DOCUMENT
<HTML>
<BODY>
<A>
<BUTTON> Text Here </BUTTON>
/A>
</BODY>
</HTML>
1. Event is created and it can be exposed, published or madeto handle any related events.
2. When objects are used they are assigned handlers. They allow subscription to the objects events.
3. Event subscribers are notified by using handler functions within the object.
4. When an event triggers the object is passed to a event handling function that provides information about the event.
Child elements that trigger events within the parent are passed down the DOM hierarchy.
CAPTURING - passing down elements in the DOM.
BUBBLING - After event reaches the desired trigger it goes back up the DOM.
Event propagation can be canceled.
DOCUMENT
<HTML>
<BODY>
<A>
<BUTTON> Text Here </BUTTON>
/A>
</BODY>
</HTML>
No comments:
Post a Comment