Professional JavaScript for Web Developers is the essential guide to next-level JavaScript development. Written for intermediate-to-advanced programmers, this book jumps right into the technical details to help you clean up your code and become a more sophisticated JavaScript developer. From JavaScript-specific object-oriented programming and inheritance, to combining JavaScript with HTML and other markup languages, expert instruction walks you through the fundamentals and beyond. This new fourth edition has been updated to cover ECMAScript 6 and 7 (also known as ES2015 and ES2016) and the major re-imagination and departure from ES 5.1; new frameworks and libraries, new techniques, new testing tools, and more are explained in detail for the professional developer, with a practical focus that helps you put your new skills to work on real-world projects.
The latest - and most dramatic - ES release is already being incorporated into JavaScript engines in major browsers; this, coupled with the rise in mobile web traffic increasing demand for responsive, dynamic web design, means that all web developers need to update their skills - and this book is your ideal resource for quick, relevant guidance.
- Get up to date with ECMAScript 6 and 7, new frameworks, and new libraries
- Delve into web animation, emerging APIs, and build systems
- Test more effectively with mocks, unit tests, functional tests, and other tools
- Plan your builds for future ES releases
Even if you think you know JavaScript, new ES releases bring big changes that will affect the way you work. For a professional-level update that doesn't waste time on coding fundamentals, Professional JavaScript for Web Developers is the ultimate resource to bring you up to speed.
Table of Contents
FOREWORD xlvii
INTRODUCTION xlix
CHAPTER 1: WHAT IS JAVASCRIPT? 1
CHAPTER 2: JAVASCRIPT IN HTML 13
CHAPTER 3: LANGUAGE BASICS 25
CHAPTER 4: VARIABLES, SCOPE, AND MEMORY 101
CHAPTER 5: BASIC REFERENCE TYPES 125
CHAPTER 6: COLLECTION REFERENCE TYPES 167
CHAPTER 7: ITERATORS AND GENERATORS 225
CHAPTER 8: OBJECTS, CLASSES, AND OBJECT-ORIENTED PROGRAMMING 251
CHAPTER 9: PROXIES AND REFLECT 323
CHAPTER 10: FUNCTIONS 349
CHAPTER 11: PROMISES AND ASYNC FUNCTIONS 391
CHAPTER 12: THE BROWSER OBJECT MODEL 437
CHAPTER 13: CLIENT DETECTION 465
CHAPTER 14: THE DOCUMENT OBJECT MODEL 491
CHAPTER 15: DOM EXTENSIONS 543
CHAPTER 16: DOM LEVELS 2 AND 3 563
CHAPTER 17: EVENTS 601
CHAPTER 18: ANIMATION AND GRAPHICS WITH CANVAS 671
CHAPTER 19: SCRIPTING FORMS 707
CHAPTER 20: JAVASCRIPT APIS 743
CHAPTER 21: ERROR HANDLING AND DEBUGGING 823
CHAPTER 22: XML IN JAVASCRIPT 849
CHAPTER 23: JSON 861
CHAPTER 24: NETWORK REQUESTS AND REMOTE RESOURCES 871
CHAPTER 25: CLIENT-SIDE STORAGE 919
CHAPTER 26: MODULES 945
CHAPTER 27: WORKERS 969
CHAPTER 28: BEST PRACTICES 1035
APPENDIX A: ES2018 AND ES2019 1067
APPENDIX B: STRICT MODE 1087
APPENDIX C: JAVASCRIPT LIBRARIES AND FRAMEWORKS 1095
APPENDIX D: JAVASCRIPT TOOLS 1101
INDEX 1113