# eventsource-polyfill

> A browser polyfill for W3C EventSource (http://www.w3.org/TR/eventsource/)

Latest version **0.9.6** (published 2015-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install eventsource-polyfill
pnpm add eventsource-polyfill
yarn add eventsource-polyfill
bun add eventsource-polyfill
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.6 |
| Published | 2015-02-28 |
| First published | 2015-02-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 178 |
| Author | amvtek |
| Maintainers | amvtek |
| Keywords | sse, server sent events, eventsource, event-source, polyfill |

## Links

- npm: https://www.npmjs.com/package/eventsource-polyfill
- Repository: https://github.com/amvtek/EventSource
- Issues: https://github.com/amvtek/EventSource/issues
- npm.io page: https://npm.io/package/eventsource-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.9.6 (latest) — 2015-02-28
- 0.9.5 — 2015-02-28

## README

EventSource Polyfill
====================

Provide polyfill to support EventSource in browser where it is not available.

> -   Used in production
> -   Tested in Internet Explorer 8 +
> -   Tested in Android browser 2.1 +
> -   [Documented][]
> -   Run the [Browser test suite][]

Installing
----------

### from source

Download suitable project archive (zip or tar.gz) from [release page][]

Include in your html documents one of the following javascript file:

> -   *dist/eventsource.js*
> -   *dist/eventsource.min.js* (minified version)

### Using bower package manager

To install package from **bower registry**, type :

    bower install eventsource-polyfill

Include in your html documents one of the following javascript file:

> -   *bower\_components/eventsource-polyfill/dist/eventsource.js*
> -   *bower\_components/eventsource-polyfill/dist/eventsource.min.js* (minified version)

### Using npm package manager

To install package from **npm registry**, type :

    npm install eventsource-polyfill

Note that this package may only be used with in **browser application**.

If you are using [browserify][] , you just have to require this package in your main module…

``` sourceCode
// load (Polyfill) EventSource, in case browser does not support it...
require('eventsource-polyfill');
```

Run the tests now
-----------------

With your web browser visit this [test site][Browser test suite]

Allow **sufficient time** ( ~ 5 minutes) for the full Test Suite to run…

Project content
---------------

dist/  
    built version of javascript modules

javascript/  
    Contains polyfill module and related unit tests

test_server/  
    python server which generates *easy to test* **event stream**

docs/  
    documentation wiki

  [Documented]: https://github.com/amvtek/EventSource/wiki
  [Browser test suite]: http://testevs.amvtek.com/
  [release page]: https://github.com/amvtek/EventSource/releases/latest
  [browserify]: http://browserify.org

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