1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-10 11:35:45 +01:00

Rename Class#setTimeout to appease AMO's validation grep.

This commit is contained in:
Kris Maglione
2010-09-17 06:15:13 -04:00
parent 8c0a734e53
commit b8331a1b55
12 changed files with 33 additions and 34 deletions

View File

@@ -528,16 +528,15 @@ Class.prototype = {
toString: function () "[instance " + this.constructor.name + "]",
/**
* Exactly like {@see nsIDOMWindow#setTimeout}, except that it
* preserves the value of 'this' on invocation of 'callback'.
* Executes 'callback' after 'timeout' milliseconds. The value of
* 'this' is preserved in the invocation of 'callback'.
*
* @param {function} callback The function to call after 'timeout'
* @param {number} timeout The timeout, in seconds, to wait
* @param {number} timeout The time, in milliseconds, to wait
* before calling 'callback'.
* @returns {integer} The ID of this timeout, to be passed to
* {@see nsIDOMWindow#clearTimeout}.
* @returns {nsITimer} The timer which backs this timeout.
*/
setTimeout: function (callback, timeout) {
timeout: function (callback, timeout) {
const self = this;
let notify = { notify: function notify(timer) { callback.call(self) } };
let timer = services.create("timer");