1. eventsource-polyfill
A browser polyfill for W3C EventSource (http://www.w3.org/TR/eventsource/)
eventsource-polyfill
Package: eventsource-polyfill
Created by: amvtek
Last modified: Fri, 17 Jun 2022 21:36:45 GMT
Version: 0.9.6
License: MIT
Downloads: 1,260,443
Repository: https://github.com/amvtek/EventSource

Install

npm install eventsource-polyfill
yarn add eventsource-polyfill

EventSource Polyfill

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

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…

// 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

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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code