OpenSource For You

Interfaces and objects

-

Many objects borrow from several different interfaces. The table object, for example, implements a specialise­d HTML table element interface, which includes such methods as createCapt­ion and insertRow. Since an HTML element is also, as far as the DOM is concerned, a node in the tree of nodes that makes up the object model for a Web page or an XML page, the table element also implements the more basic node interface, from which the element derives.

When you get a reference to a table object, as in the following example, you routinely use all three of these interfaces interchang­eably on the object, perhaps unknowingl­y:

Newspapers in English

Newspapers from India