CSS, JavaScript, the DOM Flashcards
What is the term for the series of event that must take place to render (display) the initial view of a web page?
Critical Rendering Path. Involves loading only the resources absolutely necessary to display a page above the fold, BEFORE ANY SCROLLING
What can be done to shorten the critical rendering path?
COMBINE external CSS files into one document.
DEFER loading JavaScript file using the onload event.
Use DEFFERED LOADING of images
Put CSS LINK ON TOP of page
Put script REFERENCES AT THE BOTTOM of pages.
What is the map of the CSS styles found on a web page called?
CSS Object Model
The web browser builds both a ____ out of HTML and a _____ out of the CSS rules.
DOM, CSSOM
The DOM and the CSSOM are combined to create a render tree.
(T/F)
True
The _____ is an API that represents and interacts with any HTML or XML document
The _____ is a document model loaded in the browser and representing the document as a node tree, where each node represents part of the document (element, text string, or comment)
The Document Object Model (DOM)
The DOM arranges objects in a hierarchy known as a ______.
Tree
Objects on the tree are called ____ which include:
Document
Elements
Attr
CharacterData (Text, Comment)
DocumentFragment
nodes
Most Dones of a DOM tree have:
parent node, child nodes, and siblings nodes.
DOM object references in JavaScript are not live. (T/F)
False
Once we have a reference to a node, even if some other code changed the node, our reference would still be up to date. (T/F)
True
We can run JavaScript even if the DOM hasn’t loaded. (T/F)
False
Useful code to make sure the DOM has loaded before calling code (this is what jQuery ready() does.) (T/F)
True
constructs that perform basic actions or control the execution of the program
Statements
constructs that stand for values, represented by any of the 10 JS data types.
Expressions