CodeinWP CodeinWP

JavaScript & DOM Tips, Tricks, and Techniques E-Book (No. 2)

This e-book package is a collection of 68 tips and techniques, each originally published in individual releases of Web Tools Weekly, a newsletter geared towards front-end developers.

Purchase is done via Leanpub.

Book Info

Book Contents

  • offsetParent
  • window.scrollBy()
  • cloneNode(deep)
  • importNode()
  • A Note About appendChild() and insertBefore()
  • getClientRects()
  • Array.indexOf()
  • script.onload
  • Document.createComment()
  • previousElementSibling / nextElementSibling
  • CSSRules Object
  • Getting Image Widths
  • The void Operator for IIFEs
  • Function as Second Argument for String.replace()
  • DOM Collections
  • Colors with getComputedStyle()
  • cssText and selectorText
  • event.target vs. event.currentTarget
  • preventDefault()
  • Using Array.splice()
  • The form.submit() and form.reset() Methods
  • Converting an Array-like Object to an Array
  • document.designMode
  • JSON.parse() and JSON.stringify()
  • Property Access on Strings
  • The Screen API
  • The disabled Attribute for Stylesheets and Scripts
  • useCapture with addEventListener()
  • event.detail
  • HTML Elements as Global Variables
  • The scrollHeight Property
  • classList.toggle() with Boolean Force
  • outerHTML
  • The beforeprint and afterprint Events
  • Radio Buttons and the change Event
  • document.readyState
  • “splat” an Array in ES5 vs. ES6
  • Spread Operator vs. Rest Parameters
  • insertAdjacentElement() and insertAdjacentText()
  • DOMTokenList
  • Detecting Shift/CTRL/ALT/Meta
  • CSS.supports()
  • Expando Properties
  • form.length / select.length
  • Node.isSameNode()
  • Array.prototype.filter()
  • The eventPhase Property
  • window.open() and window.opener
  • Attribute Collections as NamedNodeMaps
  • Blank Lines
  • Disabling the Context Menu
  • Queueing Items in an Array
  • text.wholeText Property
  • Modern Cookie Limitations
  • Commenting Confusing Code
  • Assigning Anonymous, Immediately Invoked Functions to Variables
  • The storage Event
  • String Creation Using fromCharCode()
  • Template Literals
  • Tagged Template Literals
  • The Range API
  • defaultChecked on Radio Buttons and Checkboxes
  • Using Negative Values with Array.prototype.slice()
  • getElementsByName()
  • Performance Testing with console.time() and console.timeEnd()
  • Dynamic Downloads with Data URIs and the download attribute
  • Math.abs() Behavior with Different Values
  • The nodeValue property
  • Using the debugger Statement
  • innerHTML and HTML Entities

Purchase is done via Leanpub.