Tag view

#browser

Cross-subject tag search for related interview cards.

Clear

Results update as you type. Press / to jump straight into search.

Tagged with browser

4 cards

JavaScript Medium Theory

DOM basics: DOM selection, querySelector, querySelectorAll, getElementById, traversal, manipulation, createElement, appendChild, removeChild, and innerHTML vs textContent

The DOM is the browser's tree representation of the page, and JavaScript can select, traverse, and update nodes through several APIs.

  • Selectors return elements or node lists
  • DOM manipulation changes the page tree
  • `textContent` is safer than arbitrary `innerHTML`

DOM basics: DOM selection, querySelector, querySelectorAll, getElementById, traversal, manipulation, createElement, appendChild, removeChild, and innerHTML vs textContent

JavaScript Medium Theory

Single-threaded nature, JavaScript execution model, and browser vs Node.js environment

JavaScript runs user code on a single main thread, but hosts like browsers and Node.js provide different APIs around that execution model.

  • One call stack runs JS code
  • Hosts provide timers, I/O, and APIs
  • Browser and Node.js expose different globals and capabilities

Single-threaded nature, JavaScript execution model, and browser vs Node.js environment