Skip to content

Commit

Permalink
Update README to explain new ES module usage
Browse files Browse the repository at this point in the history
  • Loading branch information
aomarks committed Jul 26, 2019
1 parent c419da5 commit 7f69db1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ npm install --save blocking-elements
</script>
```

### ES Module

You can also use this polyfill from an ES module by importing `blockingElements` from `/dist/blocking-elements.js`, or if your toolchain suports bare module specifiers (e.g. TypeScript with `--moduleResolution=node`), from the `blocking-elements` module name. Note that this file is not minified, includes ES2015 classes, and does not set the `document.$blockingElements` global.

```js
import {blockingElements} from 'blocking-elements';
blockingElements.push(...);
blockingElements.remove(...);
```

## Local development

Install the dependencies with `npm install` and serve the resources.
Expand Down

0 comments on commit 7f69db1

Please sign in to comment.