Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where is the source code of onBlur() or onreadystatechange() eventshandlers , are they in Browser?

 
Himanshu Bhatnagar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Source code? Decompile the browser and you can see it.

What are you trying to do exactly?


Eric
 
Aniruddh Joshi
Ranch Hand
Posts: 275
Eclipse IDE jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic