mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Comment
This commit is contained in:
parent
54ed02e302
commit
e164250fea
1 changed files with 17 additions and 1 deletions
|
|
@ -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 <https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState>.
|
||||
*
|
||||
* @example
|
||||
* `runAt(( ) => { start(); }, 'interactive')`
|
||||
*
|
||||
* */
|
||||
|
||||
export function runAt(fn, when) {
|
||||
const intFromReadyState = state => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue