From f25b087f3f96d378b6ea8ac9dd4b206a34752e42 Mon Sep 17 00:00:00 2001 From: Fumiaki MATSUSHIMA Date: Sat, 5 Mar 2016 01:02:37 +0900 Subject: [PATCH] fix(WebSocket patch): keep WebSocket constants Closes #267 --- lib/browser/websocket.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/browser/websocket.ts b/lib/browser/websocket.ts index 8967c2d67..bbdaa6fc6 100644 --- a/lib/browser/websocket.ts +++ b/lib/browser/websocket.ts @@ -30,4 +30,5 @@ export function apply(_global: any) { return proxySocket; }; + (global).WebSocket.prototype = Object.create(WS.prototype, {constructor:{value: WebSocket}}); }