Layer element

Layers were the core of a method of dynamic HTML programming specific to Netscape 4. Each layer was treated as a separate document object in JavaScript. The content could be included in the same file within the non-standard codice_1 element (or any other element with the positioning set to "absolute" via CSS) or loaded from a separate file with codice_2 or codice_3. It could also be generated via JavaScript with the codice_4 constructor. The content would then be inserted into the layer with codice_5.
But in modern browsers, the functionality of layers is provided by using an absolutely-positioned codice_6, or, for loading the content from an external file, an IFrame.
Irrelevant to the actual "use" of layers, when Netscape 4 and Internet Explorer had significantly different JavaScript implementations, a JavaScript program would very often need to run different blocks of code, depending on the browser. To decide which bunches of code to run, a JavaScript program could test for "support" for layers, regardless of whether the program involved layers at all. Namely,
if (document.layers) {
 // ...code that would be executed only by Netscape browsers...
} else {
 // ...code that would be executed only by Internet Explorer...