After our brief introduction to style sheets in the last chapter, we're now ready to dig into one of the main foundations of Dynamic HTML: the browser object model. Netscape 2 was actually the first browser that provided a documented object model, which allowed users to access both the browser environment and page contents with scripting code. However certain contents of the page such as text and images weren't accessible, until the advent of Dynamic HTML. If we are going to be able to program the object model using Dynamic HTML, then we need to understand the whole hierarchy of objects inside the browser first and what they all do.
So we're going break our discussion of the object model into two chapters. In this, the first, we'll discuss exactly what the object model is and why it's so important to Dynamic HTML programmers. From this introduction, we'll move on to the programmatic representation of the browser itself. The actual discussion of how we can manipulate elements on the web page, via the object model, won't be dealt with until the next chapter.
So, we're going to cover these topics, in this chapter:
window
object.history
, location
, navigator
, screen
, and event
.Since we haven't had an opportunity to talk in-depth about writing script code inside HTML pages, we'll refrain from giving detailed code examples in these chapters. The foundation of everything we do with DHTML is the object model; these two chapters provide a basis for everything we'll write about in this book. The fact that we're talking about the object model before we talk about scripting is logical too: it's important to talk about the objects that we can manipulate through code before we talk too much about the script code itself. While we won't explicate page after page of code in these chapters, we'll spend plenty of time talking about what the objects can do.