test/dummy/tmp/cache/assets/test/sprockets/b56dfad0b14283f2cc10c62f37d71cc7 in extface-0.1.0 vs test/dummy/tmp/cache/assets/test/sprockets/b56dfad0b14283f2cc10c62f37d71cc7 in extface-0.1.1
- old
+ new
@@ -1,21 +1,26 @@
{I"
class:ETI"BundledAsset; FI"logical_path; TI"extface/application.js; TI"
pathname; TI"O/home/alex/workspace/extface/app/assets/javascripts/extface/application.js; FI"content_type; TI"application/javascript; TI"
-mtime; Tl+óSI"length; TiÊI"digest; TI"%2ec9061395a8aecb20adc57f403d3c5a; FI"source; TI"Ê// Place all the behaviors and hooks related to the matching controller here.
+mtime; Tl+:DSI"length; Ti/I"digest; TI"%d534f49de81ce5ca27c53914a30a71b2; FI"source; TI"/// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
;
document.open_sse = function(url) {
- source.onmessage = function(e) {
- console.log(e.data);
- };
-
- source.onopen = function(e) {
- console.log('connection opened');
- };
-
- source.onerror = function(e) {
- source.close();
+ if (!!window.EventSource) {
+ var source = new EventSource(url);
+
+ source.onmessage = function(e) {
+ console.log(e.data);
+ };
+
+ source.onopen = function(e) {
+ console.log('connection opened');
+ };
+
+ source.onerror = function(e) {
+ source.close();
+ };
+ }
};
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
@@ -27,6 +32,6 @@
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
;
-; TI"required_assets_digest; TI"%f2c4f93eb6d70123893ba5d9c8a4f551; FI"
_version; TI"%ad5851230fbdd4f8a862674697158df2; F
+; TI"required_assets_digest; TI"%cd36a21c47a7bd976743685c8efa0aeb; FI"
_version; TI"%1005ed9f20e25fb0a0599a7017dd0e6b; F
\ No newline at end of file