Skip to content

Commit e164250

Browse files
committed
Comment
1 parent 54ed02e commit e164250

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

assets/resources/run-at.js

+17-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,23 @@ import { safeSelf } from './safe-self.js';
2626

2727
/* eslint no-prototype-builtins: 0 */
2828

29-
/******************************************************************************/
29+
/**
30+
* @helperScriptlet run-at.fn
31+
*
32+
* @description
33+
* Execute a function at a specific page-load milestone.
34+
*
35+
* @param fn
36+
* The function to call.
37+
*
38+
* @param when
39+
* An identifier which tells when the function should be executed.
40+
* See <https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState>.
41+
*
42+
* @example
43+
* `runAt(( ) => { start(); }, 'interactive')`
44+
*
45+
* */
3046

3147
export function runAt(fn, when) {
3248
const intFromReadyState = state => {

0 commit comments

Comments
 (0)