Skip to content

Commit 7392081

Browse files
evolkmannSanderElias
authored andcommitted
docs: add polyfill.md (#179)
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.
1 parent cc63194 commit 7392081

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

docs/polyfills.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Polyfills
2+
3+
Depending on the browsers and environments your app targets, polyfills may be
4+
required. This page lists some recommended polyfills.
5+
6+
## `Event()` constructor
7+
8+
We use [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
9+
inside Scully to be aware of different points in the lifecycle of the application.
10+
11+
To make this work in **Internet Explorer 10+**, include the following polyfill.
12+
13+
`npm install events-polyfill`
14+
15+
```ts
16+
// src/polyfills.ts
17+
18+
import 'events-polyfill/src/constructors/Event.js';
19+
```

docs/scully.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Visit one of the following topics:
1919
- [Scully Configuration](scully-configuration.md)
2020
- [Adding Blog Support](blog.md)
2121
- [Working with Plugins](plugins.md)
22+
- [Polyfills](polyfills.md)
2223
- [Code of Conduct](CODE_OF_CONDUCT.md)
2324
- [Issues](issues.md)
2425
- [Contribution Guideline](../CONTRIBUTING.md)

0 commit comments

Comments
 (0)