HTML and CSS Reference
In-Depth Information
Figure 7-3. The window object's prototype object showing the methods defined for the window
Note Accessing the object's prototype does not directly reveal the methods inherited
by that prototype. For browsers that support it (it's nonstandard), such as Safari,
Chrome, and Firefox, you will find a __proto__ property that will give you access
to the parent prototype that a particular prototype is built upon. This can be used to in-
spect the methods inherited from the parent prototype.
Events are the notifications that happen in JavaScript as a result of such things as user
input (mouse clicks, keyboard key presses, and so on) or conditions of the page (page
has loaded, and so on) that can be "listened to" in order to make something happen when
the event occurs. Elsewhere inside the window object you will see a long series of prop-
erties that begin with "on," such as onclick , onscroll , onload , and so on. These
are the events that the window object can respond to (clicking, scrolling, and loading
the page, respectively). These will have values of null for the most part, except for
onload , which will be set to function init() , since this was set in the code cre-
ated earlier at this line:
Search WWH ::

Custom Search