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 |
bluebird | var d = P.pending();
var code = 'pend' + Math.random();
function eventFunc(e) {
if (e.data === code) {
window.removeEventListener('message', eventFunc);
d.fulfill();
}
}
d.promise.then(function() {
deferred.resolve()
});
window.addEventListener('message', eventFunc);
window.postMessage(code, '*');
| ready |
Pimp |
var d = Pimp.deferred()
var code = 'pimp' + 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 |
Native |
var d = Promise.defer();
var code = 'nat' + 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 |
vow |
var d = vow.defer();
var code = 'nat' + 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 |
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 x = 1;
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 |