Название: javascript & DOM Tips, Tricks, and Techniques (Volume 1) Автор: Louis Lazaris Издательство: Leanpub Год: 2019-04-01 Страниц: 114 Язык: английский Формат: pdf (true), mobi, epub Размер: 10.1 MB
This is a collection of javascript and DOM scripting applicable to all levels of javascript and front-end development. Most of the tips cover techniques and technologies that work in all modern browsers and most older browsers.
Contents:
• Preface • javascript Naming Conventions • insertAdjacentHTML() • getBoundingClientRect() • textContent() • scrollIntoView() • The table API • Array Manipulation Tips • Pattern Matching • Strict Mode • The + Operator • contains() • Document Fragments • querySelector() and querySelectorAll() • Implied eval() • 1. The Function() constructor • 2. Passing a string literal to a setTimeout() or setInterval() call • 3. Using document.write() • selectionStart and selectionEnd • activeElement • removeEventListener() • window.matchMedia() • Try, Catch, Throw • setSelectionRange() • classList • stopPropagation() • The location Object • normalize() and splitText() • Pseudo-Elements in javascript • lastIndexOf() • The continue Statement • event.button • The keypress and keydown Events • Invoking Functions • As a function • As a method • As a constructor • Using apply() and call() • Mouse Coordinates • Array.every() • Function.call() and Function.apply() • Using .call() • Using .apply() • Function.bind() • More on Function.bind() • Partially Apply a Function • Partial Application vs Currying? • The arguments Object • Child Nodes • Augmenting Types • Configuration Data • Switch Fall-Throughs • Interacting with a Live DOM • The NodeIterator API • TreeWalker • Array.some() • Avoiding Null Comparisons • Array.map() • trim() • Mouse Event Properties • Function.length • Array.reduce() and Array.reduceRight() • Number to String Conversion • compareDocumentPosition() • null vs. undefined • Node.isEqualNode() • window.getSelection() • getElementsByClassName() • Method Lookups • The dataset Object • Encoding/Decoding URIs • Enumerable vs. Non-enumerable Properties • elementFromPoint() • scrollTop and scrollLeft • appendData() • deleteData() and insertData() • replaceData() and substringData() • Manipulating HTML Comment Nodes • Array.forEach() • The text Property on Script Elements • More Weekly Tips! • About the Author
Скачать javascript & DOM Tips, Tricks, and Techniques (Volume 1)
|