Professional JavaScript for Web Developers [5 ed.]
1394193211, 9781394193226, 9781394193219, 9781394193233
Update and upgrade your JavaScript skillset for ES 2023 with the ultimate JavaScript guide for pros Professional JavaScr
141
33
5MB
English
Pages 1104
Year 2023
Report DMCA / Copyright
DOWNLOAD EPUB FILE
Table of contents :
COVER
TABLE OF CONTENTS
TITLE PAGE
FOREWORD
INTRODUCTION
WHO THIS BOOK IS FOR
WHAT THIS BOOK COVERS
HOW THIS BOOK IS STRUCTURED
WHAT YOU NEED TO USE THIS BOOK
1 What Is JavaScript?
A SHORT HISTORY
JAVASCRIPT IMPLEMENTATIONS
SUMMARY
2 JavaScript in HTML
THE ELEMENT
INLINE CODE VERSUS EXTERNAL FILES
DOCUMENT MODES
THE ELEMENT
SUMMARY
3 Language Basics
SYNTAX
KEYWORDS AND RESERVED WORDS
VARIABLES
DATA TYPES
OPERATORS
STATEMENTS
FUNCTIONS
SUMMARY
4 Variables, Scope, and Memory
PRIMITIVE AND REFERENCE VALUES
EXECUTION CONTEXT AND SCOPE
GARBAGE COLLECTION
SUMMARY
5 Basic Reference Types
THE DATE TYPE
THE REGEXP TYPE
PRIMITIVE WRAPPER TYPES
SINGLETON BUILT-IN OBJECTS
SUMMARY
6 Advanced Reference Types
THE OBJECT TYPE
THE ARRAY TYPE
TYPED ARRAYS
THE MAP TYPE
THE SET TYPE
WEAK REFERENCES
THE WEAKMAP TYPE
THE WEAKSET TYPE
ITERATION AND SPREAD OPERATORS
SUMMARY
7 Iterators and Generators
INTRODUCTION TO ITERATION
THE ITERATOR PATTERN
GENERATORS
ASYNCHRONOUS ITERATION
SUMMARY
8 Objects, Classes, and Object-Oriented Programming
UNDERSTANDING OBJECTS
OBJECT CREATION
CLASSES
SUMMARY
9 Proxies and Reflect
PROXY FUNDAMENTALS
PROXY TRAPS AND REFLECT METHODS
PROXY PATTERNS
SUMMARY
10 Functions
ARROW FUNCTIONS
FUNCTION NAMES
UNDERSTANDING ARGUMENTS
NO OVERLOADING
DEFAULT PARAMETER VALUES
SPREAD ARGUMENTS AND REST PARAMETERS
FUNCTION DECLARATIONS VERSUS FUNCTION EXPRESSIONS
FUNCTIONS AS VALUES
FUNCTION INTERNALS
FUNCTION PROPERTIES AND METHODS
RECURSION
TAIL CALL OPTIMIZATION
CLOSURES
IMMEDIATELY INVOKED FUNCTION EXPRESSIONS
SUMMARY
11 Promises and Async/Await
INTRODUCTION TO ASYNCHRONOUS PROGRAMMING
PROMISES
ASYNC FUNCTIONS
SUMMARY
12 The Browser Object Model
THE WINDOW OBJECT
THE LOCATION OBJECT
THE NAVIGATOR OBJECT
THE SCREEN OBJECT
THE HISTORY OBJECT
SUMMARY
13 The Document Object Model
HIERARCHY OF NODES
WORKING WITH THE DOM
SELECTORS API
ELEMENT TRAVERSAL
HTML5
SUMMARY
14 DOM Extensions
STYLES
TRAVERSALS
RANGES
OBSERVER APIS
OBSERVER PERFORMANCE
SUMMARY
15 Events
EVENT FLOW
EVENT HANDLERS
THE EVENT OBJECT
EVENT TYPES
MEMORY AND PERFORMANCE
SIMULATING EVENTS
SUMMARY
16 Animation and Graphics with Canvas
USING REQUESTANIMATIONFRAME
BASIC CANVAS USAGE
THE 2D CONTEXT
WEBGL
SUMMARY
17 Scripting Forms
FORM BASICS
SCRIPTING TEXT BOXES
SCRIPTING SELECT BOXES
RICH TEXT EDITING
SUMMARY
18 JavaScript APIs
ATOMICS AND SharedArraybuffer
CLIPBOARD API
CROSS-CONTEXT MESSAGING
ENCODING API
BLOB AND FILE APIs
FULLSCREEN API
GEOLOCATION API
DEVICE APIs
MEDIA ELEMENTS
NOTIFICATIONS API
PAGE VISIBILITY API
STREAMS API
URL APIs
TIMING APIs
WEB COMPONENTS
THE WEB CRYPTOGRAPHY API
SUMMARY
19 Error Handling and Debugging
BROWSER ERROR REPORTING
ERROR HANDLING
ERROR HANDLING STRATEGIES
DEBUGGING TECHNIQUES
SUMMARY
20 JSON
SYNTAX
PARSING AND SERIALIZATION
SUMMARY
21 Network Requests and Remote Resources
THE FETCH API
CROSS-ORIGIN RESOURCE SHARING
THE BEACON API
WEB SOCKETS
THE EVENTSOURCE API
SUMMARY
22 Client-Side Storage
COOKIES
WEB STORAGE
INDEXEDDB
SUMMARY
23 Modules
UNDERSTANDING THE MODULE PATTERN
WORKING WITH PRE-ES6 MODULE LOADERS
WORKING WITH ECMASCRIPT MODULES
SUMMARY
24 Workers
INTRODUCTION TO WORKERS
DEDICATED WORKERS
SHARED WORKERS
SERVICE WORKERS
SUMMARY
25 Best Practices
MAINTAINABILITY
PERFORMANCE
STRONG TYPING
DEPLOYMENT
SUMMARY
A ES.Next
ARRAY FIND FROM LAST METHODS
HASHBANG/SHEBANG GRAMMAR
SYMBOLS AS WEAKMAP KEYS
CHANGE ARRAY BY COPY
B Strict Mode
OPTING -IN
CLASSES AND MODULES
VARIABLES
OBJECTS
FUNCTIONS
Using eval()
eval AND ARGUMENTS
COERCION OF THIS
OTHER CHANGES
C JavaScript Libraries and Frameworks
FRAMEWORKS
USEFUL LIBRARIES
D JavaScript Tools
PACKAGE MANAGERS
MODULE LOADERS
MODULE BUNDLERS
COMPILATION/TRANSPILATION TOOLS AND STATIC TYPE SYSTEMS
HIGH-PERFORMANCE SCRIPT TOOLS
EDITORS
BUILD TOOLS, AUTOMATION SYSTEMS, AND TASK RUNNERS
LINTERS AND FORMATTERS
MINIFIERS
UNIT TESTING
DOCUMENTATION GENERATORS
INDEX
COPYRIGHT
DEDICATION
ABOUT THE AUTHOR
ABOUT THE TECHNICAL EDITOR
ACKNOWLEDGMENTS
END USER LICENSE AGREEMENT