Skip to content

Instantly share code, notes, and snippets.

View rwaldron's full-sized avatar

Rick Waldron rwaldron

  • Boston, MA
View GitHub Profile
<script src="event-source.js"></script>
<script src="event-source-2.js"></script>
<script src="event-source-4.js"></script>
importScripts('jquery.hive.pollen.js');
$(function (data) {
// message received from rendering process
$.ajax.get({
url: 'proxy.php',
data: $.param(data),
dataType: 'json',
success: function(jsonObj) {
<?php
header("Content-Type: text/event-stream\n\n");
echo 'data: ' . json_encode(
array(
0 => array(
'time' => time(),
'message' => 'Some kind of foo'
),
1 => array(
/*
jQuery.Mines.Charge/Detonate/Disarm()
*/
;(function($){
var _payloadCache = {};
function blast(fuses, args) {
$.each(_payloadCache[fuses], function(){
this.apply($, args || []);
});
<!DOCTYPE html>
<html>
<head>
<title>Shared Workers</title>
<script>
var worker = new SharedWorker('sharedworker.js');
console.log(worker);
<!DOCTYPE HTML>
<html>
<head>
<script src="sharedworker.multi-connect.renderer.js"></script>
</head>
<body>
<pre id="shared-worker-log"></pre>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<script src="sharedworker.multi-connect.renderer.js"></script>
</head>
<body>
<pre id="shared-worker-log"></pre>
<pre id="shared-worker-connection-log"></pre>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Um. Duh?</title>
<script src="http://github.com/DmitryBaranovskiy/raphael/raw/master/raphael-min.js"></script>
<script>
// WORKS FINE.
console.log(Raphael);