mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-30 09:16:58 -10:00
12 lines
307 B
JavaScript
12 lines
307 B
JavaScript
const Cc = Components.classes;
|
|
const Ci = Components.interfaces;
|
|
|
|
addMessageListener("setTimeout", msg => {
|
|
let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
|
|
timer.init(_ => {
|
|
sendAsyncMessage("timeout");
|
|
}, msg.delay, Ci.nsITimer.TYPE_ONE_SHOT);
|
|
});
|
|
|
|
sendAsyncMessage("ready");
|