Skip to content

Commit

Permalink
docs: add polyfill.md (#179)
Browse files Browse the repository at this point in the history
The `Event()` constuctor is used in the browser. To make this work in Internet Explorer, a polyfill is required.

The new document describes the polyfilling process.
  • Loading branch information
evolkmann authored and SanderElias committed Jan 13, 2020
1 parent cc63194 commit 7392081
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/polyfills.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Polyfills

Depending on the browsers and environments your app targets, polyfills may be
required. This page lists some recommended polyfills.

## `Event()` constructor

We use [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
inside Scully to be aware of different points in the lifecycle of the application.

To make this work in **Internet Explorer 10+**, include the following polyfill.

`npm install events-polyfill`

```ts
// src/polyfills.ts

import 'events-polyfill/src/constructors/Event.js';
```
1 change: 1 addition & 0 deletions docs/scully.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Visit one of the following topics:
- [Scully Configuration](scully-configuration.md)
- [Adding Blog Support](blog.md)
- [Working with Plugins](plugins.md)
- [Polyfills](polyfills.md)
- [Code of Conduct](CODE_OF_CONDUCT.md)
- [Issues](issues.md)
- [Contribution Guideline](../CONTRIBUTING.md)
Expand Down

0 comments on commit 7392081

Please sign in to comment.