This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<div id="result"></div> | |
<script> | |
if (typeof(EventSource) !== 'undefined') { | |
console.info('Starting connection...'); | |
var source = new EventSource('/stream.php'); | |
source.addEventListener('open', function(e) { | |
console.info('Connection was opened.'); | |
}, false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns whether given variable is undefined | |
* | |
* @author Nils Lindentals <[email protected]> | |
* @license GNU GPL v2.0 | |
* | |
* @param variable | |
* @returns {boolean} | |
*/ | |
function isUndefined(variable) { |
NewerOlder