EventSource polyfill

Overview

EventSource polyfill - https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events

Installing:

You can get the code from npm or bower:

npm install event-source-polyfill
bower install event-source-polyfill

Just include src/eventsource.js or src/eventsource.min.js in your page to use the polyfill.

Ionic2/Angular2 Installation:

Unless a typescript definition file is created for this polyfill, this is how you would use it in an Ionic2 project. It should (in theory) be very similar in an Angular2 project.

npm install event-source-polyfill

Add to (or create) src/app/polyfills.ts (path is relative to where polyfills.ts is) :

import 'path/to/event-source-polyfill/src/eventsource.min.js'

Add anywhere you need access to EventSourcePolyfill class :

declare var EventSourcePolyfill: any;

Usage with webpack/browserify:

import { NativeEventSource, EventSourcePolyfill } from 'event-source-polyfill';

const EventSource = NativeEventSource || EventSourcePolyfill;
// OR: may also need to set as global property
global.EventSource =  NativeEventSource || EventSourcePolyfill;

Browser support:

  • IE 10+, Firefox 3.5+, Chrome 3+, Safari 4+, Opera 12+
  • IE 8 - IE 9: XDomainRequest is used internally, which has some limitations (2KB padding in the beginning is required, no way to send cookies, no way to use client certificates)
  • It works on Mobile Safari, Opera Mobile, Chrome for Android, Firefox for Android
  • It does not work on: Android Browser(requires 4 KB padding after every chunk), Opera Mini

Advantages:

  • Simple server-side code
  • Cross-domain requests support

Server-side requirements:

  • "Last-Event-ID" is sent in a query string (CORS + "Last-Event-ID" header is not supported by all browsers)
  • It is required to send 2 KB padding for IE < 10 and Chrome < 13 at the top of the response stream (the polyfill sends padding=true query argument)
  • You need to send "comment" messages each 15-30 seconds, these messages will be used as heartbeat to detect disconnects - see https://bugzilla.mozilla.org/show_bug.cgi?id=444328

Specification:

Build:

  • To build EventSource, just install npm modules (npm install) and then run the build (npm run build). It should generate a new version of src/eventsource.min.js.

Notes:

  • If you are using HTTP Basic Authentication, you can embed credentials into the URL - http://username:[email protected].

Custom Headers:

var es = new EventSourcePolyfill('/events', {
  headers: {
    'X-Custom-Header': 'value'
  }
});

Custom query parameter name for the last event id:

  • Some server require a special query parameter name for last-event-id, you can change that via option
  • The default is lastEventId
  • Example for mercure-hub (https://mercure.rocks/)
var es = new EventSourcePolyfill(hubUrl, {
  lastEventIdQueryParameterName: 'Last-Event-Id'
});

Other EventSource polyfills:

EXAMPLE

server-side (node.js)

var PORT = 8081;

var http = require("http");
var fs = require("fs");
var url = require("url");

http.createServer(function (request, response) {
  var parsedURL = url.parse(request.url, true);
  var pathname = parsedURL.pathname;
  if (pathname === "/events.php") {

    response.writeHead(200, {
      "Content-Type": "text/event-stream",
      "Cache-Control": "no-store",
      "Access-Control-Allow-Origin": "*"
    });

    var padding = new Array(2049);
    response.write(":" + padding.join(" ") + "\n"); // 2kB padding for IE
    response.write("retry: 2000\n");

    var lastEventId = Number(request.headers["last-event-id"]) || Number(parsedURL.query.lastEventId) || 0;

    var timeoutId = 0;
    var i = lastEventId;
    var c = i + 100;
    var f = function () {
      if (++i < c) {
        response.write("id: " + i + "\n");
        response.write("data: " + i + "\n\n");
        timeoutId = setTimeout(f, 1000);
      } else {
        response.end();
      }
    };

    f();

    response.on("close", function () {
      clearTimeout(timeoutId);
    });

  } else {
    if (pathname === "/") {
      pathname = "/index.html";
    }
    if (pathname === "/index.html" || pathname === "../src/eventsource.js") {
      response.writeHead(200, {
        "Content-Type": pathname === "/index.html" ? "text/html" : "text/javascript"
      });
      response.write(fs.readFileSync(__dirname + pathname));
    }
    response.end();
  }
}).listen(PORT);

or use PHP (see php/events.php)

">


  header("Content-Type: text/event-stream");
  header("Cache-Control: no-store");
  header("Access-Control-Allow-Origin: *");

  $lastEventId = floatval(isset($_SERVER["HTTP_LAST_EVENT_ID"]) ? $_SERVER["HTTP_LAST_EVENT_ID"] : 0);
  if ($lastEventId == 0) {
    $lastEventId = floatval(isset($_GET["lastEventId"]) ? $_GET["lastEventId"] : 0);
  }

  echo ":" . str_repeat(" ", 2048) . "\n"; // 2 kB padding for IE
  echo "retry: 2000\n";

  // event-stream
  $i = $lastEventId;
  $c = $i + 100;
  while (++$i < $c) {
    echo "id: " . $i . "\n";
    echo "data: " . $i . ";\n\n";
    ob_flush();
    flush();
    sleep(1);
  }

?>

index.html (php/index.html):

EventSource example ">
>
<html>
<head>
    <meta charset="utf-8" />
    <title>EventSource exampletitle>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <script src="../src/eventsource.js">script>
    <script>
      var es = new EventSource("events.php");
      var listener = function (event) {
        var div = document.createElement("div");
        var type = event.type;
        div.appendChild(document.createTextNode(type + ": " + (type === "message" ? event.data : es.url)));
        document.body.appendChild(div);
      };
      es.addEventListener("open", listener);
      es.addEventListener("message", listener);
      es.addEventListener("error", listener);
    script>
head>
<body>
body>
html>

Usage in node.js:

With some dynamic imports it may work in node.js:

Install the library and the dependency: npm install @titelmedia/node-fetch npm install event-source-polyfill

x.js:

// The @titelmedia/node-fetch is used instead of node-fetch as it supports ReadableStream Web API
import('@titelmedia/node-fetch').then(function (fetch) {
  globalThis.fetch = fetch.default;
  globalThis.Response = fetch.default.Response;
  import('event-source-polyfill').then(function (x) {
    var es = new x.default.EventSourcePolyfill('http://localhost:8004/events');
    es.onerror = es.onopen = es.onmessage = function (event) {
      console.log(event.type + ': ' + event.data);
    };
  });
});

node --experimental-modules ./x.js

License

The MIT License (MIT)

Copyright (c) 2012 [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • use native EventSource if available

    use native EventSource if available

    This ensures native EventSource will be used if it's available.

    As EventSource + CORS is now more widely supported, this seems like a better default.

    Currently the tests just exit if native support is detected. Probably a better solution would be to (somehow) force the tests to use the polyfill version.

    opened by meleyal 28
  • dragAndDrop for Opera not double click,...

    dragAndDrop for Opera not double click,...

    Hi, drag and drop polyfill for Opera is not as perfect as expected. I have a little html5 application which allows to edit some data for an object consisting of a main div element which is dragable and contain 5 childs (1 img or div and 4 further divs). If I issue a double click on the object, I open a window allowing to set/modify some datas. This don't work for opera with your script operaDragAndDrop.js. Drag and drop seem not to work for me, the only event I get are dragstart and dragend. Regards

    opened by jjsarton 19
  • Event Source receives heartbeat event but still gives error when timeout: Error: No activity within N milliseconds. 96 characters received. Reconnecting.

    Event Source receives heartbeat event but still gives error when timeout: Error: No activity within N milliseconds. 96 characters received. Reconnecting.

    I am working on a web application using react and spring boot. To add live notification feature, I choosed server-sent-events with your library on the client. I set heartbeatTimeout to 120s and periodically send a heartbeat event every 40s to keep the connection open.

    It works OK when I test it locally, but when I deploy the app it doesn't anymore. The connection is still open normally, the client still receives the heartbeat events in full and at the right time, but usually every 3 heartbeat events, the client gives an error: Error: No activity within N milliseconds. 96 characters received. Reconnecting.

    I think the biggest difference between local environment and my deployment environment is that in local environment, client connects directly to backend, and in deployment environment, I use Nginx between them. But I still can't figure out which part of the deployment pattern is the reason of error.

    Here is the code I use: React

    React.useEffect(() => {
        let eventSource;
        let reconnectFrequencySeconds = 1;
    
        // Putting these functions in extra variables is just for the sake of readability
        const wait = function () {
          return reconnectFrequencySeconds * 1000;
        };
    
        const tryToSetup = function () {
          setupEventSource();
          reconnectFrequencySeconds *= 2;
    
          if (reconnectFrequencySeconds >= 64) {
            reconnectFrequencySeconds = 64;
          }
        };
    
        // Reconnect on every error
        const reconnect = function () {
          setTimeout(tryToSetup, wait());
        };
    
        function setupEventSource() {
          fetchNotification();
    
          eventSource = new EventSourcePolyfill(
            `${API_URL}/notification/subscription`,
            {
              headers: {
                "X-Auth-Token": store.getState().auth.token,
              },
              heartbeatTimeout: 120000,
            }
          );
    
          eventSource.onopen = (event) => {
            console.info("SSE opened");
            reconnectFrequencySeconds = 1;
          };
    
          // This event only to keep sse connection alive
          eventSource.addEventListener(SSE_EVENTS.HEARTBEAT, (e) => {
            console.log(new Date(), e);
          });
    
          eventSource.addEventListener(SSE_EVENTS.NEW_NOTIFICATION, (e) =>
            handleNewNotification(e)
          );
    
          eventSource.onerror = (event) => {
            // When server SseEmitters timeout, it cause error
            console.error(
              `EventSource connection state: ${
                eventSource.readyState
              }, error occurred: ${JSON.stringify(event)}`
            );
    
            if (event.target.readyState === EventSource.CLOSED) {
              console.log(
                `SSE closed (event readyState = ${event.target.readyState})`
              );
            } else if (event.target.readyState === EventSource.CONNECTING) {
              console.log(
                `SSE reconnecting (event readyState = ${event.target.readyState})`
              );
            }
    
            eventSource.close();
            reconnect();
          };
        }
    
        setupEventSource();
    
        return () => {
          eventSource.close();
          console.info("SSE closed");
        };
      }, []);
    

    Spring

        /**
         * @param toUser
         * @return
         */
        @GetMapping("/subscription")
        public ResponseEntity<SseEmitter> events(
            @CurrentSecurityContext(expression = "authentication.name") String toUser
        ) {
            log.info(toUser + " subscribes at " + getCurrentDateTime());
    
            SseEmitter subscription;
    
            if (subscriptions.containsKey(toUser)) {
                subscription = subscriptions.get(toUser);
            } else {
                subscription = new SseEmitter(Long.MAX_VALUE);
                Runnable callback = () -> subscriptions.remove(toUser);
    
                subscription.onTimeout(callback); // OK
                subscription.onCompletion(callback); // OK
                subscription.onError((exception) -> { // Must consider carefully, but currently OK
                    subscriptions.remove(toUser);
                    log.info("onError fired with exception: " + exception);
                });
    
                subscriptions.put(toUser, subscription);
            }
    
            HttpHeaders responseHeaders = new HttpHeaders();
            responseHeaders.set("X-Accel-Buffering", "no");
            responseHeaders.set("Cache-Control", "no-cache");
    
            return ResponseEntity.ok().headers(responseHeaders).body(subscription);
        }
    
        /**
         * To keep connection alive
         */
        @Async
        @Scheduled(fixedRate = 40000)
        public void sendHeartbeatSignal() {
            subscriptions.forEach((toUser, subscription) -> {
                try {
                    subscription.send(SseEmitter
                                          .event()
                                          .name(SSE_EVENT_HEARTBEAT)
                                          .comment(":\n\nkeep alive"));
    //                log.info("SENT HEARBEAT SIGNAL AT: " + getCurrentDateTime());
                } catch (Exception e) {
                    // Currently, nothing need be done here
                }
            });
        }
    

    Nginx

    events{
    }
    http {
    
    server {
        client_max_body_size 200M;
        proxy_send_timeout 12000s;
        proxy_read_timeout 12000s;
        fastcgi_send_timeout 12000s;
        fastcgi_read_timeout 12000s;
        location = /api/notification/subscription {
            proxy_pass http://baseweb:8080;
            proxy_set_header Connection '';
            proxy_http_version 1.1;
            chunked_transfer_encoding off;
            proxy_buffering off;
            proxy_buffer_size 0;
            proxy_cache off;
            proxy_connect_timeout 600s;
            fastcgi_param NO_BUFFERING "";
            fastcgi_buffering off;
        }
    }
    }
    

    I really need support now

    opened by AnhTuan-AiT 16
  • Timeout Error

    Timeout Error

    Very nice library!

    Could you explain why you are throwing an error here: https://github.com/Yaffle/EventSource/blob/master/eventsource.js#L601

    I have a global error handler that displays errors to the user and this keeps triggering the error handler.

    opened by dtjohnson 15
  • How to get 401 error object

    How to get 401 error object

    Hi, I am currently using your EventSourcePolyfill because of the Authorization header feature. However I have this issue:

    When a user tries to reach our SSE endpoint and the authentication fails, he gets a 401 back with the Www-Authenticate header in the response, containing information to login to our Auth server.

    This Error is seen by your polyfill implementation as it says EventSource's response has a status 401 that is not 200. Aborting the connection. However there seems to be no option to get the actual response that was given, which I need to do some automatic login procedures in the client library I am implementing.

    Is it at all possible to expose the actual xhr error object?

    opened by Falx 14
  • .close() gives exception

    .close() gives exception

    Im trying to close my SSE connection but I get an exception.

    I initiate like this: this.source = new EventSourcePolyfill(url, { headers: { "X-Requested-With": "XMLHttpRequest" } });

    And then I close it like this: this.source.close();

    I get the following exception: Uncaught (in promise) DOMException

    And Chrome tells me that the issue is on line 460: reader.cancel();

    opened by ejerskov 11
  • Type error : Fail to fetch

    Type error : Fail to fetch

    image

    I have set heartbeatTimeout value to 5 mins even though API trigger every 1 mins with error : "Type error : Fail to fetch" Can anyone help :

    1. to find out the cause for this issue and
    2. why heartbeatTimeout is not working in this case. Thanks
    opened by priyapitroda1712 10
  • grunt + uglify

    grunt + uglify

    hi! i'm using eventsource as a polyfill for internet explorer (of course), but, when using grunt-uglify plugin for my builds, i noticed that there are no "bang" comments in eventsource. at least, it is good to use them at least in the license section so it can be preserved in automated builds.

    you can read more about here: https://github.com/mishoo/UglifyJS2#keeping-copyright-notices-or-other-comments

    also, including it to bower would be nice (as another user already suggested).

    best regards, richard.

    opened by vltr 10
  • TypeError: EventSource is not a constructor

    TypeError: EventSource is not a constructor

    I want to add event source in stencil component but it shows me error . i have used this code.

    import { NativeEventSource, EventSourcePolyfill } from 'event-source-polyfill';
    const EventSource = NativeEventSource || EventSourcePolyfill;
    
    componentWillLoad () {
        this.base = new BaseComponent(this, dxp)
        this.base.i18Init(dxp, 'Notification', messages)
        const eventSource = new EventSource('http://localhost:9999/notify')
        eventSource.onmessage = e => {
          const msg = e.data
          this.message = msg
        }
    
    help wanted 
    opened by adbusa67 9
  • Crashes Android app on 4.4.2 when used in WebView

    Crashes Android app on 4.4.2 when used in WebView

    We have used this polyfill in an WebView in an Android app. Unfortunately, it crashes the app on Android 4.4.2 (noticed on multiple devices, e.g. Samsung GT-I9505), the line responsible for the crash is that:

    var es = new global.EventSource("data:text/event-stream;charset=utf-8,");
    

    You can reproduce it with only this one line in an empty WebView. This is what appears in the device log:

    F/libc    ( 6834): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 6860 (example.webviewtest)
    I/chromium( 6834): [INFO:CONSOLE(0)] "EventSource cannot load data:text/event-stream;charset=utf-8,. Cross origin requests are only supported for HTTP.", source: http://192.168.0.1/wahlcomputer/ (0)
    E/MP-Decision( 2116): num online cores: 4 reqd : 2 available : 4 rq_depth:1.500000 hotplug_avg_load_dw: 123
    E/MP-Decision( 2116): DOWN cpu:3 core_idx:3 Ns:3.100000 Ts:240 rq:1.500000 seq:245.000000
    E/MP-Decision( 2116): DOWN cpu:2 core_idx:2 Ns:2.100000 Ts:240 rq:1.500000 seq:245.000000
    E/MP-Decision( 2116): num online cores: 2 reqd : 1 available : 4 rq_depth:0.000000 hotplug_avg_load_dw: 19
    E/MP-Decision( 2116): DOWN cpu:1 core_idx:1 Ns:1.100000 Ts:190 rq:0.000000 seq:42.000000
    D/SSRMv2:CustomFrequencyManagerService(  816): releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT  frequency : 1350000  uid : 1000  pid : 816  tag : ACTIVITY_RESUME_BOOSTER@9
    I/DEBUG   (  268): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    I/DEBUG   (  268): Build fingerprint: 'samsung/jfltexx/jflte:4.4.2/KOT49H/I9505XXUGNG8:user/release-keys'
    I/DEBUG   (  268): Revision: '11'
    I/DEBUG   (  268): pid: 6834, tid: 6860, name: example.webviewtest  >>> com.example.webviewtest <<<
    I/DEBUG   (  268): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
    I/ServiceKeeper(  816): In getpackagename pid = 816 uid = 1000 package name = android
    I/ServiceKeeper(  816): In getpackagename pid = 816 uid = 1000 package name = android
    V/AudioPolicyManagerBase(  281): stopOutput() output 2, stream 1, session 142
    V/AudioPolicyManagerBase(  281): changeRefCount() stream 1, count 0
    W/AudioPolicyManagerBase(  281): stream type [13], return media strategy
    W/AudioPolicyManagerBase(  281): stream type [13], return media strategy
    W/AudioPolicyManagerBase(  281): stream type [13], return media strategy
    W/AudioPolicyManagerBase(  281): stream type [13], return media strategy
    W/AudioPolicyManagerBase(  281): stream type [13], return media strategy
    W/AudioPolicyManagerBase(  281): stream type [13], return media strategy
    V/AudioPolicyManagerBase(  281): getNewDevice() selected device 0
    V/AudioPolicyManagerBase(  281): setOutputDevice() output 2 device 0000 force 0 delayMs 192 
    V/AudioPolicyManagerBase(  281): setOutputDevice() prevDevice 0002
    W/AudioPolicyManagerBase(  281): stream type [13], return media strategy
    W/AudioPolicyManagerBase(  281): stream type [13], return media strategy
    V/AudioPolicyManagerBase(  281): setOutputDevice() setting same device 0000 or null device for output 2
    I/DEBUG   (  268):     r0 00000000  r1 00000000  r2 00000003  r3 0000002c
    I/DEBUG   (  268):     r4 7c470a10  r5 740673a7  r6 00000000  r7 7a5d16d8
    I/DEBUG   (  268):     r8 74a506d5  r9 00000001  sl 7a75d508  fp 78ae6ac8
    I/DEBUG   (  268):     ip 00000001  sp 78c1a078  lr 74a506bf  pc 74a4f95e  cpsr 200b0030
    I/DEBUG   (  268):     d0  0000000000000000  d1  0000000000000000
    I/DEBUG   (  268):     d2  00200072006f0066  d3  0050005400540048
    I/DEBUG   (  268):     d4  e12fff1ee28dd004  d5  78ae5b6ce7f001f1
    I/DEBUG   (  268):     d6  43145dc7435a393c  d7  412e848000000000
    I/DEBUG   (  268):     d8  41d55b0af9811661  d9  3fe0000000000000
    I/DEBUG   (  268):     d10 0000000000000000  d11 0000000000000000
    I/DEBUG   (  268):     d12 0000000000000000  d13 0000000000000000
    I/DEBUG   (  268):     d14 0000000000000000  d15 0000000000000000
    I/DEBUG   (  268):     d16 0070007400740068  d17 0031002f002f003a
    I/DEBUG   (  268):     d18 0031002e00320039  d19 0034002e00380036
    I/DEBUG   (  268):     d20 003000300031002e  d21 006800610077002f
    I/DEBUG   (  268):     d22 006d006f0063006c  d23 0065007400750070
    I/DEBUG   (  268):     d24 3f95c966ebf3f9e8  d25 bf95c966c155d531
    I/DEBUG   (  268):     d26 402213664f3f26db  d27 4000000000000000
    I/DEBUG   (  268):     d28 3ffcea4783f8a3fe  d29 bfcc400000000026
    I/DEBUG   (  268):     d30 3ff0000000000000  d31 40c3880000000005
    I/DEBUG   (  268):     scr 3a000013
    I/DEBUG   (  268): 
    I/DEBUG   (  268): backtrace:
    I/DEBUG   (  268):     #00  pc 00db495e  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):     #01  pc 00db56bb  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):     #02  pc 005881bb  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):     #03  pc 005882d3  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):     #04  pc 00588635  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):     #05  pc 00588677  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):     #06  pc 00625ad7  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):     #07  pc 00db4e37  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):     #08  pc 00db556b  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):     #09  pc 00778081  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):     #10  pc 00b6e7ab  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):     #11  pc 00b7781b  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):     #12  pc 00000b78  <unknown>
    I/DEBUG   (  268): 
    I/DEBUG   (  268): stack:
    I/DEBUG   (  268):          78c1a038  7c46cb90  
    I/DEBUG   (  268):          78c1a03c  00000000  
    I/DEBUG   (  268):          78c1a040  74ea35f0  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):          78c1a044  2182472c  
    I/DEBUG   (  268):          78c1a048  78c1a0bc  [stack:6860]
    I/DEBUG   (  268):          78c1a04c  00000003  
    I/DEBUG   (  268):          78c1a050  00000001  
    I/DEBUG   (  268):          78c1a054  00000001  
    I/DEBUG   (  268):          78c1a058  00000001  
    I/DEBUG   (  268):          78c1a05c  740673a1  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):          78c1a060  00000000  
    I/DEBUG   (  268):          78c1a064  2182472c  
    I/DEBUG   (  268):          78c1a068  78c1a0a0  [stack:6860]
    I/DEBUG   (  268):          78c1a06c  78ff6de4  
    I/DEBUG   (  268):          78c1a070  00000000  
    I/DEBUG   (  268):          78c1a074  7c470a10  
    I/DEBUG   (  268):     #00  78c1a078  7c470a10  
    I/DEBUG   (  268):          78c1a07c  00000000  
    I/DEBUG   (  268):          78c1a080  00000003  
    I/DEBUG   (  268):          78c1a084  7c470a10  
    I/DEBUG   (  268):          78c1a088  740673a7  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):          78c1a08c  74a506bf  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):     #01  78c1a090  00000000  
    I/DEBUG   (  268):          78c1a094  73fc7709  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):          78c1a098  78c1a0dc  [stack:6860]
    I/DEBUG   (  268):          78c1a09c  7a5d1870  
    I/DEBUG   (  268):          78c1a0a0  7a5d1870  
    I/DEBUG   (  268):          78c1a0a4  78ff6dd8  
    I/DEBUG   (  268):          78c1a0a8  74c11aab  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):          78c1a0ac  7c46d6e0  
    I/DEBUG   (  268):          78c1a0b0  74c11aab  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):          78c1a0b4  7c46d6e0  
    I/DEBUG   (  268):          78c1a0b8  74b9e413  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):          78c1a0bc  78ff6dd8  
    I/DEBUG   (  268):          78c1a0c0  7c46d6e0  
    I/DEBUG   (  268):          78c1a0c4  74b9e413  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):          78c1a0c8  74c11aab  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):          78c1a0cc  7c46d6e0  
    I/DEBUG   (  268):          ........  ........
    I/DEBUG   (  268):     #02  78c1a0e8  78c1a0f8  [stack:6860]
    I/DEBUG   (  268):          78c1a0ec  73fc85b9  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):          78c1a0f0  7a5d16d8  
    I/DEBUG   (  268):          78c1a0f4  7a5d1850  
    I/DEBUG   (  268):          78c1a0f8  7a5d1870  
    I/DEBUG   (  268):          78c1a0fc  7a5d1850  
    I/DEBUG   (  268):          78c1a100  00000000  
    I/DEBUG   (  268):          78c1a104  7c46d6e0  
    I/DEBUG   (  268):          78c1a108  7a5d1870  
    I/DEBUG   (  268):          78c1a10c  74000000  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):          78c1a110  7dace518  
    I/DEBUG   (  268):          78c1a114  7a5d16d8  
    I/DEBUG   (  268):          78c1a118  78c1a260  [stack:6860]
    I/DEBUG   (  268):          78c1a11c  00000001  
    I/DEBUG   (  268):          78c1a120  74f3fe54  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268):          78c1a124  742232d7  /system/lib/libwebviewchromium.so
    I/DEBUG   (  268): 
    I/DEBUG   (  268): memory near r4:
    I/DEBUG   (  268):     7c4709f0 00000000 00000000 00000000 00000000  
    I/DEBUG   (  268):     7c470a00 78b05360 7a5c6be0 00320039 0000011b  
    I/DEBUG   (  268):     7c470a10 74f2aa58 00000002 74f4bbd8 74f2aab8  
    I/DEBUG   (  268):     7c470a20 74f2aaf0 21824780 00000000 00000001  
    I/DEBUG   (  268):     7c470a30 00750001 00000000 00000004 00000000  
    I/DEBUG   (  268):     7c470a40 ffffffff 00000000 ffffffff 00000000  
    I/DEBUG   (  268):     7c470a50 ffffffff 00000000 ffffffff 00000005  
    I/DEBUG   (  268):     7c470a60 00000020 00000000 ffffffff 00000000  
    I/DEBUG   (  268):     7c470a70 ffffffff 00000000 7c46d6e0 00000000  
    I/DEBUG   (  268):     7c470a80 00000000 7c46d730 00000000 ffffffff  
    I/DEBUG   (  268):     7c470a90 74f2aa40 00000008 00000000 00000000  
    I/DEBUG   (  268):     7c470aa0 00000000 00000000 00000000 00000000  
    I/DEBUG   (  268):     7c470ab0 ffffffff 00000000 00000000 7c470a10  
    I/DEBUG   (  268):     7c470ac0 74a4fe99 00000000 00000000 00000000  
    I/DEBUG   (  268):     7c470ad0 00000000 00000000 00000000 00000000  
    I/DEBUG   (  268):     7c470ae0 00000000 00000000 00000000 00000000  
    I/DEBUG   (  268): 
    I/DEBUG   (  268): memory near r5:
    I/DEBUG   (  268):     74067384 f7fc4620 b148fe18 46399b0c e88d4632  
    I/DEBUG   (  268):     74067394 462b0018 043cf8d0 fa34f1eb e8bdb005  
    I/DEBUG   (  268):     740673a4 f1a083f0 f7ff0054 0000bfc5 4604b5f7  
    I/DEBUG   (  268):     740673b4 32ecf8d0 f890b1db b9c662e9 ad026800  
    I/DEBUG   (  268):     740673c4 7140f8d0 f75d2004 4909fe59 31084479  
    I/DEBUG   (  268):     740673d4 f8456001 46200d04 47b84629 f5c24628  
    I/DEBUG   (  268):     740673e4 4630fb40 fd00f5b8 f8842201 bdfe22e9  
    I/DEBUG   (  268):     740673f4 00e39404 4604b5f8 460e6882 eb036803  
    I/DEBUG   (  268):     74067404 eb030581 e0030782 0b04f855 fcecf5b8  
    I/DEBUG   (  268):     74067414 d1f942bd bdf860a6 43f7e92d 27004604  
    I/DEBUG   (  268):     74067424 0954f100 f8d4e02c 68050618 a8016007  
    I/DEBUG   (  268):     74067434 f5c29701 f8d4fb16 b9091620 e9e0f5b5  
    I/DEBUG   (  268):     74067444 8618f8d4 f8564646 f5b80b04 f8d4fccd  
    I/DEBUG   (  268):     74067454 f8d42620 46403618 eb034631 ebc60c82  
    I/DEBUG   (  268):     74067464 f5b5020c f8d4ea04 1e410620 1620f8c4  
    I/DEBUG   (  268):     74067474 4628682a 68934649 46284798 fcb4f5b8  
    I/DEBUG   (  268): 
    I/DEBUG   (  268): memory near r7:
    I/DEBUG   (  268):     7a5d16b8 00000000 00000000 00000000 00000000  
    E/MP-Decision( 2116): num online cores: 1 reqd : 2 available : 4 rq_depth:2.200000 hotplug_avg_load_dw: 57
    E/MP-Decision( 2116): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 rq:2.200000 seq:49.000000
    I/DEBUG   (  268):     7a5d16c8 00000000 00000000 00000000 000000f3  
    I/DEBUG   (  268):     7a5d16d8 7a5d0001 00000000 00000004 00000000  
    I/DEBUG   (  268):     7a5d16e8 ffffffff 00000000 ffffffff 00000000  
    I/DEBUG   (  268):     7a5d16f8 ffffffff 00000000 ffffffff 00000005  
    I/DEBUG   (  268):     7a5d1708 00000020 00000000 ffffffff 00000000  
    I/DEBUG   (  268):     7a5d1718 ffffffff 00000000 7c46d6e0 00000000  
    I/DEBUG   (  268):     7a5d1728 00000000 00000000 ffc00000 41dfffff  
    I/DEBUG   (  268):     7a5d1738 00000000 00000000 ffffffff 00000000  
    I/DEBUG   (  268):     7a5d1748 ffffffff 00000000 ffffffff 00000000  
    I/DEBUG   (  268):     7a5d1758 ffffffff 00000000 ffffffff 00000000  
    I/DEBUG   (  268):     7a5d1768 ffffffff 00000000 ffffffff 00000000  
    I/DEBUG   (  268):     7a5d1778 ffffffff 00000000 00000000 00000000  
    I/DEBUG   (  268):     7a5d1788 78a81778 7dace5d0 00000008 00000007  
    I/DEBUG   (  268):     7a5d1798 00000003 00000000 00000000 00000000  
    I/DEBUG   (  268):     7a5d17a8 00000001 00000000 00000000 00000000  
    I/DEBUG   (  268): 
    I/DEBUG   (  268): memory near r8:
    I/DEBUG   (  268):     74a506b4 47a8ab0b f7ff4620 980bf94d f574b108  
    I/DEBUG   (  268):     74a506c4 b013db31 bf00bd30 001c14b1 0014ddfd  
    I/DEBUG   (  268):     74a506d4 000cf1a0 bf86f7ff 460eb573 46044615  
    I/DEBUG   (  268):     74a506e4 b112b930 0028f102 f5a8e02e e02bfce1  
    I/DEBUG   (  268):     74a506f4 f5714610 6803f373 e016b30b 0001f022  
    I/DEBUG   (  268):     74a50704 6840e000 6863bb00 462aa802 f8401c59  
    I/DEBUG   (  268):     74a50714 60614d04 f5c24631 4605f187 b1109801  
    I/DEBUG   (  268):     74a50724 f6903004 4628d9fb a902e00e f8413008  
    I/DEBUG   (  268):     74a50734 46694d08 dc2df5df d1e22800 68a2e7e2  
    I/DEBUG   (  268):     74a50744 0001f012 e7ddd1da b5f7bd7c 4606460f  
    I/DEBUG   (  268):     74a50754 f018a801 683dfa82 603b2300 f5b19c01  
    I/DEBUG   (  268):     74a50764 6862f875 46284601 ffb6f7ff 46204601  
    I/DEBUG   (  268):     74a50774 fa1cf018 1d28b115 d9d0f690 f367f578  
    I/DEBUG   (  268):     74a50784 460568a2 b11a6860 f5a86811 4602fe29  
    I/DEBUG   (  268):     74a50794 46304629 f5b0f577 f6fb4620 4630f6fb  
    I/DEBUG   (  268):     74a507a4 0000bdfe b087b530 9d0b4604 980d990c  
    I/DEBUG   (  268): 
    I/DEBUG   (  268): memory near sl:
    I/DEBUG   (  268):     7a75d4e8 00000000 00000000 7a75d4e8 7a75d4e8  
    I/DEBUG   (  268):     7a75d4f8 00000000 00000000 000000b8 00000023  
    I/DEBUG   (  268):     7a75d508 00000003 7c517980 7c46b530 7c46b530  
    I/DEBUG   (  268):     7a75d518 00000000 00000000 00000000 00000053  
    I/DEBUG   (  268):     7a75d528 74e93088 7c470c40 73ef0fcb 7c4f5f88  
    I/DEBUG   (  268):     7a75d538 7a75d518 7c470c3f 7c470c20 00000001  
    I/DEBUG   (  268):     7a75d548 78a82df0 00000001 00000004 7c46c590  
    I/DEBUG   (  268):     7a75d558 00000000 00000000 7a75d558 7a75d558  
    I/DEBUG   (  268):     7a75d568 00000000 228db417 400c0101 0000001b  
    I/DEBUG   (  268):     7a75d578 74f3b228 00000001 74a7d7f1 00000000  
    I/DEBUG   (  268):     7a75d588 78a88ee8 00000053 74e93030 7a75dda0  
    I/DEBUG   (  268):     7a75d598 00776569 7a7fd320 7a75d59b 7a75dd9b  
    I/DEBUG   (  268):     7a75d5a8 7a75dd80 00000001 78fed150 00000001  
    I/DEBUG   (  268):     7a75d5b8 00000002 7a7a0140 00000000 00000000  
    I/DEBUG   (  268):     7a75d5c8 7a75d5c0 7a75d5c0 00000000 7a75e620  
    I/DEBUG   (  268):     7a75d5d8 00000050 0000003b 74e930e0 7c471f60  
    I/DEBUG   (  268): 
    I/DEBUG   (  268): memory near fp:
    I/DEBUG   (  268):     78ae6aa8 2fb1e6e5 791248f9 2fb1e70d 79124915  
    I/DEBUG   (  268):     78ae6ab8 2fb1e735 7912492d 2fb1e75d 79124945  
    I/DEBUG   (  268):     78ae6ac8 3b026ea1 00000013 7c4767f8 00000000  
    I/DEBUG   (  268):     78ae6ad8 00000010 0000001b 78b1ce58 78ae4e68  
    I/DEBUG   (  268):     78ae6ae8 789efda8 78ae71d0 3b01da15 00000013  
    I/DEBUG   (  268):     78ae6af8 789ef918 79112109 7911212d 0000008b  
    I/DEBUG   (  268):     78ae6b08 78b1c6b8 78b1c48c 00000000 00000000  
    I/DEBUG   (  268):     78ae6b18 00000000 00000000 00000000 00000000  
    I/DEBUG   (  268):     78ae6b28 00000000 00000000 00000000 00000000  
    I/DEBUG   (  268):     78ae6b38 00000000 00000000 00000000 00000000  
    I/DEBUG   (  268):     78ae6b48 00000000 00000000 00000000 00000000  
    I/DEBUG   (  268):     78ae6b58 00000000 00000100 00000000 00000000  
    I/DEBUG   (  268):     78ae6b68 00000000 00000000 00000000 00000000  
    I/DEBUG   (  268):     78ae6b78 00000000 00000000 00760000 00000000  
    I/DEBUG   (  268):     78ae6b88 004d0079 00000013 00000002 400c01c8  
    I/DEBUG   (  268):     78ae6b98 00000010 0000002b 00000001 74f4bc38  
    I/DEBUG   (  268): 
    I/DEBUG   (  268): memory near sp:
    I/DEBUG   (  268):     78c1a058 00000001 740673a1 00000000 2182472c  
    I/DEBUG   (  268):     78c1a068 78c1a0a0 78ff6de4 00000000 7c470a10  
    I/DEBUG   (  268):     78c1a078 7c470a10 00000000 00000003 7c470a10  
    I/DEBUG   (  268):     78c1a088 740673a7 74a506bf 00000000 73fc7709  
    I/DEBUG   (  268):     78c1a098 78c1a0dc 7a5d1870 7a5d1870 78ff6dd8  
    I/DEBUG   (  268):     78c1a0a8 74c11aab 7c46d6e0 74c11aab 7c46d6e0  
    I/DEBUG   (  268):     78c1a0b8 74b9e413 78ff6dd8 7c46d6e0 74b9e413  
    I/DEBUG   (  268):     78c1a0c8 74c11aab 7c46d6e0 74b9e413 7a5d1870  
    I/DEBUG   (  268):     78c1a0d8 78c1a0f8 78c1a0f8 7c470a1c 742231bd  
    I/DEBUG   (  268):     78c1a0e8 78c1a0f8 73fc85b9 7a5d16d8 7a5d1850  
    I/DEBUG   (  268):     78c1a0f8 7a5d1870 7a5d1850 00000000 7c46d6e0  
    I/DEBUG   (  268):     78c1a108 7a5d1870 74000000 7dace518 7a5d16d8  
    I/DEBUG   (  268):     78c1a118 78c1a260 00000001 74f3fe54 742232d7  
    I/DEBUG   (  268):     78c1a128 7dace518 78c1a260 7a5d16d8 00000000  
    I/DEBUG   (  268):     78c1a138 7dace518 78c1a260 00000001 00000001  
    I/DEBUG   (  268):     78c1a148 74f3fe54 74223639 000000b0 78c1a1d4  
    I/DEBUG   (  268): 
    I/DEBUG   (  268): code around pc:
    I/DEBUG   (  268):     74a4f93c 0230f104 466d62e6 3308447b e8826023  
    I/DEBUG   (  268):     74a4f94c 46200003 bf00bd7c 004db0f0 4604b537  
    I/DEBUG   (  268):     74a4f95c 68036f80 47886819 69c56820 da70f5e7  
    I/DEBUG   (  268):     74a4f96c 46132200 0198f100 f613a801 4620dfe5  
    I/DEBUG   (  268):     74a4f97c 47a8a901 b1109801 f5e03008 bd3edbd7  
    I/DEBUG   (  268):     74a4f98c bfe4f7ff 000cf1a0 bffaf7ff 4604b57f  
    I/DEBUG   (  268):     74a4f99c f1002500 f8a00680 e9d05072 f7cd0138  
    I/DEBUG   (  268):     74a4f9ac ed9fc2bc 22007b12 ec432300 ed8d2b11  
    I/DEBUG   (  268):     74a4f9bc ec411b00 ee860b16 46300b07 2b10ec53  
    I/DEBUG   (  268):     74a4f9cc d8a3f704 69de6823 da3af5e7 462b462a  
    I/DEBUG   (  268):     74a4f9dc 0198f100 f613a803 4620dfaf 47b0a903  
    I/DEBUG   (  268):     74a4f9ec b1109803 f5e03008 bd7fdba1 00000000  
    I/DEBUG   (  268):     74a4f9fc 408f4000 20c5f890 b1724603 2072f9b0  
    I/DEBUG   (  268):     74a4fa0c f8802100 2a0210c5 f7ffd001 69c0bfbf  
    I/DEBUG   (  268):     74a4fa1c 1d181e41 f61661d9 47709976 b1137c4b  
    I/DEBUG   (  268):     74a4fa2c f8a02102 f7ff1072 f1a0bfe5 f7ff000c  
    I/DEBUG   (  268): 
    I/DEBUG   (  268): code around lr:
    I/DEBUG   (  268):     74a5069c dff9f602 68416820 47884620 21012200  
    I/DEBUG   (  268):     74a506ac 92006803 6add2203 47a8ab0b f7ff4620  
    I/DEBUG   (  268):     74a506bc 980bf94d f574b108 b013db31 bf00bd30  
    I/DEBUG   (  268):     74a506cc 001c14b1 0014ddfd 000cf1a0 bf86f7ff  
    I/DEBUG   (  268):     74a506dc 460eb573 46044615 b112b930 0028f102  
    I/DEBUG   (  268):     74a506ec f5a8e02e e02bfce1 f5714610 6803f373  
    I/DEBUG   (  268):     74a506fc e016b30b 0001f022 6840e000 6863bb00  
    I/DEBUG   (  268):     74a5070c 462aa802 f8401c59 60614d04 f5c24631  
    I/DEBUG   (  268):     74a5071c 4605f187 b1109801 f6903004 4628d9fb  
    I/DEBUG   (  268):     74a5072c a902e00e f8413008 46694d08 dc2df5df  
    I/DEBUG   (  268):     74a5073c d1e22800 68a2e7e2 0001f012 e7ddd1da  
    I/DEBUG   (  268):     74a5074c b5f7bd7c 4606460f f018a801 683dfa82  
    I/DEBUG   (  268):     74a5075c 603b2300 f5b19c01 6862f875 46284601  
    I/DEBUG   (  268):     74a5076c ffb6f7ff 46204601 fa1cf018 1d28b115  
    I/DEBUG   (  268):     74a5077c d9d0f690 f367f578 460568a2 b11a6860  
    I/DEBUG   (  268):     74a5078c f5a86811 4602fe29 46304629 f5b0f577  
    D/STATUSBAR-NetworkController( 1175): refreshSignalCluster: data=-1 bt=false
    D/STATUSBAR-IconMerger( 1175): checkOverflow(576), More:false, Req:false Child:2
    I/DEBUG   (  268): !@dumpstate -k -t -z -d -o /data/log/dumpstate_app_native -m 6834
    I/BootReceiver(  816): Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
    W/ActivityManager(  816):   Force finishing activity com.example.webviewtest/.MainActivity
    
    opened by herrernst 9
  • history.back() breaks connection in chrome browser

    history.back() breaks connection in chrome browser

    I have the sse running in a frame to maintain the persistent connection while navigating to various pages in a different frame. Whenever I click the "back" button, the connection to the server is lost. It will reconnect after the heartbeat timeout. Is this expected behavior? This does not happen when using IE.

    opened by neowizdom 9
  • Note from readme file

    Note from readme file

    Regarding this line here - https://github.com/Yaffle/EventSource/commit/f864e1fc30fc4dd10c895b10e451a89042ca837b#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5 It's a "little" self-critical, but why we shouldn't use it?

    opened by 4gray 3
  • ES Module

    ES Module

    Is there a way to import it as a modern ES Module ? In the latest version of Angular it's causing warnings: CommonJS or AMD dependencies can cause optimization bailouts

    opened by HoplaGeiss 2
  • How to use with last version of React.js

    How to use with last version of React.js

    Hi guys,

    I'm trying since way too long to import this library in a React project using React's last version. At the moment, it's just a sandbox to try various things.

    But I miserably fail everytime. I have tried to:

    • Import it in the public/index.html like any other "old school" scripts: "TS2304: Cannot find name 'EventSourcePolyfill'."
    • Import it in the public/index.html like any other "old school" scripts AND declare it as for angular by using declare var EventSourcePolyfill: any; : Uncaught SyntaxError: Unexpected token '<' (the < symbol is actually the beginning of the <!Doctype> tag of the public/index.html page
    • Import it like a module: import * as ES from "../node_modules/event-source-polyfill/src/eventsource.min.js"; -> nope: Could not find a declaration file for module '../node_modules/event-source-polyfill/src/eventsource.min.js'
    • Import it like a module: import EventSourcePolyfill from "../node_modules/event-source-polyfill/src/eventsource.min.js"; -> nope, same error
    • Import it like a module: import EventSourcePolyfill from "../node_modules/event-source-polyfill/src/eventsource.min.js"; -> nope, Could not find a declaration file for module 'event-source-polyfill'.

    etc, etc...

    I'm new to react, so i'm probably doing something wrong, but I hardly understand why we couldn't import it like any other module with a simple import EventSourcePolyfill from "event-source-polyfill";

    Any idea / savior?

    opened by geoffroyp 1
  • Disconnects after 61s.

    Disconnects after 61s.

    I am attempting to use the Polyfill as my service now requires an api-key header. I know that I can open a long lasting http2 stream using curl in my terminal. However when using the polyfil the connection gets killed by the server after 61s. The message recieved is: IO: Stream reset by SERVER with error code INTERNAL_ERROR (0x2)

    I am wondering what might be the cause of this? Does the polyfill use http2 and if so has it be tested properly on it?

    opened by AustinYQM 0
  • target url differs from the request i am making

    target url differs from the request i am making

    Hi, There is probably something very obvious that i am not understanding right, and the real issue is probably me not getting the polyfill right, rather than the poylfill doing something wrong...but, i am struggling with something here so if you could give me ahint it'd be much appreciated :)

    when making my connection to my route: 'https://my-api.my-domain.com' i am getting a connectionEvent of type 'error', ,telling me it can't find the route : url: "https://my-domain.com\n ",

    wich in my network tab translates to a requestURL like this : "https://my-domain.com%20%20%20%20%20%20%20%20%20%20?LastEventId=215464464",

    Off course my back end sends out a 404 to the front end because there is no such route

    So...it keeps on failing,

    opened by regola-Tacens 2
Owner
Viktor
A developer from Russia, now living in Netherlands
Viktor
A JSON polyfill. No longer maintained.

?? Unmaintained ?? JSON 3 is **deprecated** and **no longer maintained**. Please don't use it in new projects, and migrate existing projects to use th

BestieJS Modules 1k Dec 24, 2022
A responsive image polyfill for , srcset, sizes, and more

Picturefill A responsive image polyfill. Authors: See Authors.txt License: MIT Picturefill has three versions: Version 1 mimics the Picture element pa

Scott Jehl 10k Dec 31, 2022
A JSON polyfill. No longer maintained.

?? Unmaintained ?? JSON 3 is **deprecated** and **no longer maintained**. Please don't use it in new projects, and migrate existing projects to use th

BestieJS Modules 1k Dec 24, 2022
jQuery contextMenu plugin & polyfill

jQuery contextMenu plugin & polyfill $.contextMenu is a management facility for - you guessed it - context menus. It was designed for an application w

SWIS 2.2k Dec 29, 2022
A JavaScript polyfill for the HTML5 placeholder attribute

#Placeholders.js - An HTML5 placeholder attribute polyfill Placeholders.js is a polyfill (or shim, or whatever you like to call it) for the HTML5 plac

James Allardice 958 Nov 20, 2022
🎚 HTML5 input range slider element polyfill

rangeslider.js Simple, small and fast jQuery polyfill for the HTML5 <input type="range"> slider element. Check out the examples. Touchscreen friendly

André Ruffert 2.2k Jan 8, 2023
A window.fetch JavaScript polyfill.

window.fetch polyfill The fetch() function is a Promise-based mechanism for programmatically making web requests in the browser. This project is a pol

GitHub 25.6k Jan 4, 2023
Use plain functions as modifiers. Polyfill for RFC: 757 | Default Modifier Manager

Use plain functions as modifiers. Polyfill for RFC: 757 | Default Modifier Manager

null 7 Jan 14, 2022
Polyfill to remove click delays on browsers with touch UIs

FastClick FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a click event on mobile

FT Labs 18.8k Jan 2, 2023
Javascript client for Sanity. Works in node.js and modern browsers (older browsers needs a Promise polyfill).

@sanity/client Javascript client for Sanity. Works in node.js and modern browsers (older browsers needs a Promise polyfill). Requirements Sanity Clien

Sanity 23 Nov 29, 2022
PouchDB for Deno, leveraging polyfill for IndexedDB based on SQLite.

PouchDB for Deno PouchDB for Deno, leveraging polyfill for IndexedDB based on SQLite. Usage import PouchDB from 'https://deno.land/x/[email protected]

Aaron Huggins 19 Aug 2, 2022
Window.fetch polyfill

window.fetch polyfill This project adheres to the [Open Code of Conduct][code-of-conduct]. By participating, you are expected to uphold this code. [co

null 38 Sep 11, 2020
Polyfill `error.cause`

Polyfill error.cause. error.cause is a recent JavaScript feature to wrap errors. try { doSomething() } catch (cause) { throw new Error('message',

ehmicky 4 Dec 15, 2022
A polyfill for ES6-style Promises

ES6-Promise (subset of rsvp.js) This is a polyfill of the ES6 Promise. The implementation is a subset of rsvp.js extracted by @jakearchibald, if you'r

Stefan Penner 7.3k Dec 28, 2022
Fast and lightweight dependency-free vanilla JavaScript polyfill for native lazy loading / the awesome loading='lazy'-attribute.

loading="lazy" attribute polyfill Fast and lightweight vanilla JavaScript polyfill for native lazy loading, meaning the behaviour to load elements rig

Maximilian Franzke 571 Dec 30, 2022