VulpesOS/gaia/apps/email/js/ext/shim-sham.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

28 lines
559 B
JavaScript
Executable file

/**
* Do the required global namespace clobbering for our node binding friends.
**/
(function () {
// Like setTimeout, but only takes a function argument. There's
// no time argument (always zero) and no arguments (you have to
// use a closure).
function setZeroTimeout(fn) {
setTimeout(fn);
}
// Add the one thing we want added to the window object.
window.setZeroTimeout = setZeroTimeout;
window.process = {
immediate: false,
nextTick: function(cb) {
if (this.immediate)
cb();
else
window.setZeroTimeout(cb);
}
};
}());