From e164250feab9b1da5e9d32d57fcfa00fb9dd8789 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 5 Nov 2024 09:26:23 -0500 Subject: [PATCH] Comment --- assets/resources/run-at.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/assets/resources/run-at.js b/assets/resources/run-at.js index f9971155a..1119699e5 100644 --- a/assets/resources/run-at.js +++ b/assets/resources/run-at.js @@ -26,7 +26,23 @@ import { safeSelf } from './safe-self.js'; /* eslint no-prototype-builtins: 0 */ -/******************************************************************************/ +/** + * @helperScriptlet run-at.fn + * + * @description + * Execute a function at a specific page-load milestone. + * + * @param fn + * The function to call. + * + * @param when + * An identifier which tells when the function should be executed. + * See . + * + * @example + * `runAt(( ) => { start(); }, 'interactive')` + * + * */ export function runAt(fn, when) { const intFromReadyState = state => {