Skip to content

Commit

Permalink
Misc JSDoc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicjansma committed Apr 4, 2018
1 parent 2ff1e2a commit 9c3e863
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions boomerang.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9c3e863

Please sign in to comment.