Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ECMAScript Cookbook

You're reading from   ECMAScript Cookbook Over 70 recipes to help you learn the new ECMAScript (ES6/ES8) features and solve common JavaScript problems

Arrow left icon
Product type Paperback
Published in Mar 2018
Publisher Packt
ISBN-13 9781788628174
Length 348 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Ross Harrison Ross Harrison
Author Profile Icon Ross Harrison
Ross Harrison
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Building with Modules FREE CHAPTER 2. Staying Compatible with Legacy Browsers 3. Working with Promises 4. Working with async/await and Functions 5. Web Workers, Shared Memory, and Atomics 6. Plain Objects 7. Creating Classes 8. Inheritance and Composition 9. Larger Structures with Design Patterns 10. Working with Arrays 11. Working with Maps and Symbols 12. Working with Sets 13. Other Books You May Enjoy

Installing and configuring - Firefox

Subsequent recipes will assume an environment that is capable of using ES modules. There are two strategies for accomplishing this: creating a build step that collects all the modules used into a single file for the browser to download, or using a browser that is capable of using ES modules. This recipe demonstrates the latter option.

Getting ready

To step through this recipe, you need a computer with an operating system (OS) that is supported by Firefox. It supports recent versions of Windows and macOS, as well as a large number of Linux distributions. Most likely, if your OS doesn't support Firefox, you are already aware of this.

How to do it...

  1. To install Firefox, open a browser and enter the following URL:
    https://www.mozilla.org/firefox.
  2. Click the button that says Download to download the installer.
  3. After the installer has finished downloading, double click the installer and follow the onscreen instructions.
  4. To configure Firefox, open the Firefox browser and enter the following URL: 
    about:config.
  5. The menu will allow you to enable advanced and experimental features. If you see a warning, click the button that says I accept the risk!
  6. Find the dom.moduleScripts.enabled setting, and double-click it to set the value to true, as shown in following screenshot:

How it works...

Firefox supports ES modules, but disables them by default. This allows developers to experiment with the feature, while the majority of users are not exposed to it.

There's more...

The same as the Installing and configuring - Chrome section.

You have been reading a chapter from
ECMAScript Cookbook
Published in: Mar 2018
Publisher: Packt
ISBN-13: 9781788628174
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime