Lesson plan
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 element (or any other element with the positioning set to "absolute" via CSS) or loaded from a separate file with or . It could also be generated via JavaScript with the constructor. The content would then be inserted into the layer with . But in modern browsers, the functionality of layers is provided by using an absolutely-positioned , or, for loading the content from an external file, an . At the height of the Browser Wars, Netscape 4 and Internet Explorer had significantly different JavaScript implementations. Thus, layers could be used for browser detection. A JavaScript program would very often need to run different blocks of code, depending on the browser. To decide which blocks 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... }
Article summary
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 element (or any other element with the positioning set to "absolute" via CSS) or loaded from a separate file with or . It could also be generated via JavaScript with the constructor. The content would then be inserted into the layer with . But in modern browsers, the functionality of layers is provided by using an absolutely-positioned , or, for loading the content from an external file, an . At the height of the Browser Wars, Netscape 4 and Internet Explorer had significantly different JavaScript implementations. Thus, layers could be used for browser detection. A JavaScript program would very often need to run different blocks of code, depending on the browser. To decide which blocks 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... }
Key claims
No claims recorded.
Discussion questions
- Summarise the article in your own words. Which single claim would you verify first, and why?
- Which claim in this article is most likely to be revised as the sources update? How would you check its current status?
- If two sources disagreed about one of these facts, what would you need in order to trust one over the other?
Bibliography
No sources recorded.
Key claims and bibliography are generated from the same tracked claims and sources as the article page.