This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Where can i find the source code of onBlur() or onchange event handlers? are the defination of these written in Browser? how is browser able to understand events? can i change the browser code to make my custom event handlers?
Maybe you can download the code of an open source browser and see the code.
My rough idea of it would be.. browser would have some listener/observer design pattern implemented.
Where an object watches the state of the DOM object.
There would be a boolean like isControlOnMe which is reset to false when a user moves out of the field.
Now the listener calls every function written against the onBlur attribute once state of isControlOnMe switches from true to false.
"One of the best things you could do is to simplify a larger application into a smaller one by reducing its process and complexity - Fowler"