Microsoft Edge does not like the W3CWebSocket wrapper
Scenario:
A web application that uses browserify and a 3rd party JS library that uses WebSocket-Node to run in both browser and Node. So, when doing the browserify stuff, lib/browser.js is taken (which is just a wrapper of the native WebSocket in the browser).
However, Microsoft Edge 11 does not like it and fails ("invalid syntax"). It seems that this here does not point to window but to something strange (see the image):
I don't have an Edge browser so it will take some time before I can put my hands into this. In the meanwhile may be someone can help.
I tried to reproduce this today using Microsoft Edge 44.17763.1.0,Microsoft EdgeHTML 18.17763, but I was unable to. It seemed to work fine.
Perhaps this works on newer versions of Edge? I don't have an easy way of testing on older versions.
If Microsoft Edge 44.17763.1.0 uses Chromium, then there should be zero issues.
It does not; the Chromium version hasn't been released yet. They have dev and canary builds available that use Chromium, but it's not stable yet.
I am seeing this same issue - but in Chrome Version 75.0.3770.100 (Official Build) (64-bit). this is simply undefined:
