lie |
var d = lie();
var code = 'lie' + Math.random();
function eventFunc(e) {
if (e.data === code) {
window.removeEventListener('message',eventFunc);
d.resolve();
}
}
window.addEventListener('message',eventFunc);
d.promise.then(function() {
deferred.resolve()
})
window.postMessage(code, '*');
| ready |
when |
var d = when.defer()
var code = 'when' + Math.random();
function eventFunc(e) {
if (e.data === code) {
window.removeEventListener('message',eventFunc);
d.resolve();
}
}
window.addEventListener('message',eventFunc);
d.promise.then(function() {
deferred.resolve()
})
window.postMessage(code, '*');
| ready |
RSVP |
var d = RSVP.defer();
var code = 'rsvp' + Math.random();
function eventFunc(e) {
if (e.data === code) {
window.removeEventListener('message',eventFunc);
d.resolve();
}
}
window.addEventListener('message',eventFunc);
d.promise.then(function() {
deferred.resolve()
})
window.postMessage(code, '*');
| ready |
q |
var d = Q.defer()
var code = 'q' + Math.random();
function eventFunc(e) {
if (e.data === code) {
window.removeEventListener('message',eventFunc);
d.resolve();
}
}
window.addEventListener('message',eventFunc);
d.promise.then(function() {
deferred.resolve()
})
window.postMessage(code, '*');
| ready |
catiline |
var d = cw.deferred()
var code = 'cw' + Math.random();
function eventFunc(e) {
if (e.data === code) {
window.removeEventListener('message',eventFunc);
d.resolve();
}
}
window.addEventListener('message',eventFunc);
d.promise.then(function() {
deferred.resolve()
})
window.postMessage(code, '*');
| ready |
lie via message channel |
var d = lie2();
var code = 'lie' + Math.random();
function eventFunc(e) {
if (e.data === code) {
window.removeEventListener('message',eventFunc);
d.resolve();
}
}
window.addEventListener('message',eventFunc);
d.promise.then(function() {
deferred.resolve()
})
window.postMessage(code, '*');
| ready |
message channel lie |
var d = lie();
var code = 'lie' + Math.random();
function eventFunc(e) {
if (e.data === code) {
d.resolve();
}
}
channel.port1.onmessage=eventFunc;
d.promise.then(function() {
deferred.resolve()
})
channel.port2.postMessage(code);
| ready |
message channel lie via message channel |
var d = lie2();
var code = 'lie' + Math.random();
function eventFunc(e) {
if (e.data === code) {
d.resolve();
}
}
channel.port1.onmessage=eventFunc;
d.promise.then(function() {
deferred.resolve()
})
channel.port2.postMessage(code);
| ready |
message channel when |
var d = when.defer()
var code = 'when' + Math.random();
function eventFunc(e) {
if (e.data === code) {
d.resolve();
}
}
channel.port1.onmessage=eventFunc;
d.promise.then(function() {
deferred.resolve()
})
channel.port2.postMessage(code);
| ready |
message channel rsvp |
var d = RSVP.defer();
var code = 'rsvp' + Math.random();
function eventFunc(e) {
if (e.data === code) {
d.resolve();
}
}
channel.port1.onmessage=eventFunc;
d.promise.then(function() {
deferred.resolve()
})
channel.port2.postMessage(code);
| ready |
message channel q |
var d = Q.defer()
var code = 'q' + Math.random();
function eventFunc(e) {
if (e.data === code) {
d.resolve();
}
}
channel.port1.onmessage=eventFunc;
d.promise.then(function() {
deferred.resolve()
})
channel.port2.postMessage(code);
| ready |
message channel catline |
var d = cw.deferred()
var code = 'cw' + Math.random();
function eventFunc(e) {
if (e.data === code) {
d.resolve();
}
}
channel.port1.onmessage=eventFunc;
d.promise.then(function() {
deferred.resolve()
})
channel.port2.postMessage(code);
| ready |