From 9c3e86397e02fa8548fc82c28cf77c6ec81d0848 Mon Sep 17 00:00:00 2001 From: Nic Jansma Date: Tue, 16 Jan 2018 11:19:13 -0500 Subject: [PATCH] Misc JSDoc fixes --- boomerang.js | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/boomerang.js b/boomerang.js index 612213e5d..6829fdbd8 100644 --- a/boomerang.js +++ b/boomerang.js @@ -1246,19 +1246,6 @@ BOOMR_check_doc_domain(); return result; }, - /** - * The callback function may return a falsy value to disconnect the - * observer after it returns, or a truthy value to keep watching for - * mutations. If the return value is numeric and greater than 0, then - * this will be the new timeout. If it is boolean instead, then the - * timeout will not fire any more so the caller MUST call disconnect() - * at some point. - * - * @callback BOOMR~addObserverCallback - * @param {object[]} mutations List of mutations detected by the observer or `undefined` if the observer timed out - * @param {object} callback_data Is the passed in `callback_data` parameter without modifications - */ - /** * `find` for Arrays * @@ -1294,6 +1281,19 @@ BOOMR_check_doc_domain(); } }, + /** + * The callback function may return a falsy value to disconnect the + * observer after it returns, or a truthy value to keep watching for + * mutations. If the return value is numeric and greater than 0, then + * this will be the new timeout. If it is boolean instead, then the + * timeout will not fire any more so the caller MUST call disconnect() + * at some point. + * + * @callback BOOMR~addObserverCallback + * @param {object[]} mutations List of mutations detected by the observer or `undefined` if the observer timed out + * @param {object} callback_data Is the passed in `callback_data` parameter without modifications + */ + /** * Add a MutationObserver for a given element and terminate after `timeout`ms. * @@ -1948,12 +1948,13 @@ BOOMR_check_doc_domain(); setImmediate: function(fn, data, cb_data, cb_scope) { var cb, cstack; + /* BEGIN_DEBUG */ // DEBUG: This is to help debugging, we'll see where setImmediate calls were made from if (typeof Error !== "undefined") { cstack = new Error(); cstack = cstack.stack ? cstack.stack.replace(/^Error/, "Called") : undefined; } - // END-DEBUG + /* END_DEBUG */ cb = function() { fn.call(cb_scope || null, data, cb_data || {}, cstack); @@ -3080,8 +3081,10 @@ BOOMR_check_doc_domain(); */ if (typeof BOOMR.window.BOOMR_onload === "number") { /** - * Time the loader script started (if using the asynchronous loader snippet) - * (`BOOMR_onload`) + * Time the `window.onload` event fired (if using the asynchronous loader snippet). + * + * This timestamp is logged in the case boomerang.js loads after the onload event + * for browsers that don't support NavigationTiming. * * @type {TimeStamp} * @memberof BOOMR