From 5676acba32f079291693df8504916a3cc8a121e0 Mon Sep 17 00:00:00 2001 From: Fabrizio Cucci Date: Mon, 2 Oct 2017 16:45:57 +0100 Subject: [PATCH 1/2] Fixed "sse-item-store-jaxrs-webapp" sample While on Chrome the problem is not visible, on Firefox the "New items size: ..." message is not shown due to the ReferenceError (i.e. "ReferenceError: event is not defined"). --- .../sse-item-store-jaxrs-webapp/src/main/webapp/js/engine.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/sse-item-store-jaxrs-webapp/src/main/webapp/js/engine.js b/examples/sse-item-store-jaxrs-webapp/src/main/webapp/js/engine.js index a77a98e9c6..c8cdb0fc25 100644 --- a/examples/sse-item-store-jaxrs-webapp/src/main/webapp/js/engine.js +++ b/examples/sse-item-store-jaxrs-webapp/src/main/webapp/js/engine.js @@ -89,7 +89,7 @@ function receiveMessages() { display("Added new item: " + event.data, "#444444"); }; - source.addEventListener("size", function(e) { + source.addEventListener("size", function (event) { console.log('Received event ' + event.name + ': ' + event.data); display("New items size: " + event.data, "#0000FF"); }, false); From e50c2b708fa33228d61c4c212b197db841d5f3e6 Mon Sep 17 00:00:00 2001 From: Fabrizio Cucci Date: Mon, 2 Oct 2017 16:47:41 +0100 Subject: [PATCH 2/2] Fixed "sse-item-store-jersey-webapp" sample While on Chrome the problem is not visible, on Firefox the "New items size: ..." message is not shown due to the ReferenceError (i.e. "ReferenceError: event is not defined"). --- .../sse-item-store-jersey-webapp/src/main/webapp/js/engine.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/sse-item-store-jersey-webapp/src/main/webapp/js/engine.js b/examples/sse-item-store-jersey-webapp/src/main/webapp/js/engine.js index 6bf486f0c4..22cd99c249 100644 --- a/examples/sse-item-store-jersey-webapp/src/main/webapp/js/engine.js +++ b/examples/sse-item-store-jersey-webapp/src/main/webapp/js/engine.js @@ -89,7 +89,7 @@ function receiveMessages() { display("Added new item: " + event.data, "#444444"); }; - source.addEventListener("size", function(e) { + source.addEventListener("size", function (event) { console.log('Received event ' + event.name + ': ' + event.data); display("New items size: " + event.data, "#0000FF"); }, false);