diff --git a/samples/SocketsSample/wwwroot/polling.html b/samples/SocketsSample/wwwroot/polling.html index 789e92f6cf..797b28e120 100644 --- a/samples/SocketsSample/wwwroot/polling.html +++ b/samples/SocketsSample/wwwroot/polling.html @@ -46,10 +46,10 @@ xhr.send(null); } - this.onopen = function () { }; - this.onmessage = function () { }; - this.onerror = function (event) { }; - this.send = function (data) { + sock.onopen = function () { }; + sock.onmessage = function () { }; + sock.onerror = function (event) { }; + sock.send = function (data) { if (!sock.connectionId) { throw "Not connected"; } diff --git a/samples/SocketsSample/wwwroot/sse.html b/samples/SocketsSample/wwwroot/sse.html index 05921c3a4a..0d2a97c767 100644 --- a/samples/SocketsSample/wwwroot/sse.html +++ b/samples/SocketsSample/wwwroot/sse.html @@ -34,10 +34,10 @@ }); } - this.onopen = function () { }; - this.onmessage = function () { }; - this.onerror = function (event) { }; - this.send = function (data) { + sock.onopen = function () { }; + sock.onmessage = function () { }; + sock.onerror = function (event) { }; + sock.send = function (data) { if (!sock.connectionId) { throw "Not connected"; }