# @mattkrick/event-source-polyfill

> A minimum immplementation of EventSource for IE11 and Edge

Latest version **0.1.0** (published 2018-11-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mattkrick/event-source-polyfill
pnpm add @mattkrick/event-source-polyfill
yarn add @mattkrick/event-source-polyfill
bun add @mattkrick/event-source-polyfill
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-11-12 |
| First published | 2018-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 289.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Matt Krick |
| Maintainers | mattkrick |
| Keywords | event, source, SSE, eventsource, polyfill |

## Links

- npm: https://www.npmjs.com/package/@mattkrick/event-source-polyfill
- Repository: https://github.com/mattkrick/event-source-polyfill
- Homepage: https://github.com/mattkrick/event-source-polyfill#readme
- Issues: https://github.com/mattkrick/event-source-polyfill/issues
- npm.io page: https://npm.io/package/@mattkrick/event-source-polyfill

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2018-11-12

## README

# event-source-polyfill

EventSource polyfill for IE11 and Edge. Fully spec compliant: https://html.spec.whatwg.org/multipage/server-sent-events.html

## Why?

Because no other polyfill follows the spec.

## What's it do?

The __exact__ same thing that a minimum implementation of EventSource does. __No more, no less.__
For SSE that implements a heartbeat, see
https://github.com/mattkrick/trebuchet-client/

## Installation

`yarn add @mattkrick/event-source-polyfill @mattkrick/event-target-polyfill`

```js
import EventTargetPolyfill from '@mattkrick/event-target-polyfill'
import EventSourcePolyfill from '@mattkrick/event-source-polyfill'

window.EventTarget = EventTargetPolyfill
window.EventSource = EventSourcePolyfill
```

NOTE: Make sure your browser supports `EventTarget`! If it doesn't use that polyfill, too.

---
_Source: https://npm.io/package/@mattkrick/event-source-polyfill · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
