Java Reference
In-Depth Information
In this chapter we have learned the following:
• The window object is the global object in a browser.
• Global variables are actually properties of the window object.
alert , confirm() , and prompt() are all methods of the window object, and
open dialogs that halt the execution of the program.
• The navigator object gives information about the user's browser and operating
system, although it can be unreliable.
• The location object provides information about the URL of the current page.
• The history object keeps information about the pages that have been visited in
the session.
• You can open, close, resize, and move windows (although, this doesn't mean that
you should!).
• The screen object provides information about the user's screen.
• The document.write() is an archaic method of writing text to the document
and should be avoided.
• Cookies can be used to store small pieces of information between requests using the
document.cookie property.
• The window.setTimeout() method can be used to invoke a function after a
set amount of time.
• The window.setInterval() method can be used to repeatedly invoke a func-
In the next chapter, we'll be looking at how to handle errors and write tests in JavaScript.
Search WWH ::

Custom Search