Module "frontend-packages/headless-content-unblocker/src/checker/findAndUnblock"
Type aliases
FindAndUnblockOptions
Find
AndUnblockOptions<ExtendedBlockerDefinition>: { checker: BlockerCheckerCallback < ExtendedBlockerDefinition > ; customInitiators?: ( ownerDocument: Document , defaultView: typeof window ) => void ; delegateClick?: Parameters < typeof delegateClick > [ 1 ] ; mode?: "unblock" | "skip" | "busy" ; overwriteAttributeValue?: Parameters < typeof transformToOriginalAttribute > [ 0 ] [ "overwriteAttributeValue" ] ; priorityUnblocked?: ( unblocked: ReturnType < typeof findBlockedNodes > , priority: number ) => void ; transactionClosed?: ( unblocked: ReturnType < typeof findBlockedNodes > ) => void ; visual?: Omit < Parameters < typeof createVisual > [ 0 ] , "node" | "blocker" | "mount" > & { busy?: ( contentBlocker: HTMLElement ) => void ; mount: BlockerMountCallback < ExtendedBlockerDefinition > ; unmount?: ( contentBlocker: HTMLElement ) => void } }
Defined in builds/devowlio/devowl-wp/frontend-packages/headless-content-unblocker/src/checker/findAndUnblock.tsx:37
Type parameters
Type declaration
Optional customInitiators?: ( ownerDocument: Document , defaultView: typeof window ) => void
( ownerDocument: Document , defaultView: typeof window ) : void
Parameters
ownerDocument: Document
defaultView: typeof window
Returns void
Optional delegateClick?: Parameters < typeof delegateClick > [ 1 ]
Optional mode?: "unblock" | "skip" | "busy"
Optional overwriteAttributeValue?: Parameters < typeof transformToOriginalAttribute > [ 0 ] [ "overwriteAttributeValue" ]
Optional priorityUnblocked?: ( unblocked: ReturnType < typeof findBlockedNodes > , priority: number ) => void
Optional transactionClosed?: ( unblocked: ReturnType < typeof findBlockedNodes > ) => void
Optional visual?: Omit < Parameters < typeof createVisual > [ 0 ] , "node" | "blocker" | "mount" > & { busy?: ( contentBlocker: HTMLElement ) => void ; mount: BlockerMountCallback < ExtendedBlockerDefinition > ; unmount?: ( contentBlocker: HTMLElement ) => void }
Functions
findAndUnblock
findAndUnblock<ExtendedBlockerDefinition>( __namedParameters: { checker: BlockerCheckerCallback < ExtendedBlockerDefinition > ; customInitiators: ( ownerDocument: Document , defaultView: typeof window ) => void ; delegateClickSelectors: { nextSibling?: DelegateClickElement [] ; parentNextSibling?: DelegateClickElement [] ; same?: DelegateClickElement [] } ; mode: "busy" | "unblock" | "skip" ; overwriteAttributeValue: ( value: string , originalAttribute: string ) => string ; priorityUnblocked: ( unblocked: ReturnType < typeof findBlockedNodes > , priority: number ) => void ; transactionClosed: ( unblocked: ReturnType < typeof findBlockedNodes > ) => void ; visual: Omit < { blocker: BlockerConfiguration ; dependantVisibilityContainers?: string [] ; mount: BlockerMountCallback < BlockerConfiguration > ; node: HTMLElement ; setVisualParentIfClassOfParent?: Parameters < typeof findVisualParent > [ 1 ] } , "node" | "blocker" | "mount" > & { busy?: ( contentBlocker: HTMLElement ) => void ; mount: BlockerMountCallback < ExtendedBlockerDefinition > ; unmount?: ( contentBlocker: HTMLElement ) => void } } ) : Promise < void >
Defined in builds/devowlio/devowl-wp/frontend-packages/headless-content-unblocker/src/checker/findAndUnblock.tsx:76
Type parameters
Parameters
__namedParameters: { checker: BlockerCheckerCallback < ExtendedBlockerDefinition > ; customInitiators: ( ownerDocument: Document , defaultView: typeof window ) => void ; delegateClickSelectors: { nextSibling?: DelegateClickElement [] ; parentNextSibling?: DelegateClickElement [] ; same?: DelegateClickElement [] } ; mode: "busy" | "unblock" | "skip" ; overwriteAttributeValue: ( value: string , originalAttribute: string ) => string ; priorityUnblocked: ( unblocked: ReturnType < typeof findBlockedNodes > , priority: number ) => void ; transactionClosed: ( unblocked: ReturnType < typeof findBlockedNodes > ) => void ; visual: Omit < { blocker: BlockerConfiguration ; dependantVisibilityContainers?: string [] ; mount: BlockerMountCallback < BlockerConfiguration > ; node: HTMLElement ; setVisualParentIfClassOfParent?: Parameters < typeof findVisualParent > [ 1 ] } , "node" | "blocker" | "mount" > & { busy?: ( contentBlocker: HTMLElement ) => void ; mount: BlockerMountCallback < ExtendedBlockerDefinition > ; unmount?: ( contentBlocker: HTMLElement ) => void } }
customInitiators: ( ownerDocument: Document , defaultView: typeof window ) => void
( ownerDocument: Document , defaultView: typeof window ) : void
Parameters
ownerDocument: Document
defaultView: typeof window
Returns void
mode: "busy" | "unblock" | "skip"
overwriteAttributeValue: ( value: string , originalAttribute: string ) => string
( value: string , originalAttribute: string ) : string
Parameters
value: string
originalAttribute: string
Returns string
priorityUnblocked: ( unblocked: ReturnType < typeof findBlockedNodes > , priority: number ) => void
transactionClosed: ( unblocked: ReturnType < typeof findBlockedNodes > ) => void
visual: Omit < { blocker: BlockerConfiguration ; dependantVisibilityContainers?: string [] ; mount: BlockerMountCallback < BlockerConfiguration > ; node: HTMLElement ; setVisualParentIfClassOfParent?: Parameters < typeof findVisualParent > [ 1 ] } , "node" | "blocker" | "mount" > & { busy?: ( contentBlocker: HTMLElement ) => void ; mount: BlockerMountCallback < ExtendedBlockerDefinition > ; unmount?: ( contentBlocker: HTMLElement ) => void }
Returns Promise < void >
insertChildAtIndex
insertChildAtIndex( container: HTMLElement , child: HTMLElement , index: number ) : void
Defined in builds/devowlio/devowl-wp/frontend-packages/headless-content-unblocker/src/checker/findAndUnblock.tsx:294
Parameters
container: HTMLElement
child: HTMLElement
index: number
Returns void
Legend
Namespace
Object literal
Variable
Function
Function with type parameter
Type alias
Type alias with type parameter
unblock
: Unblocks as expected in respect tochecker
.skip
: The unblocking mechanism will be skipped and only visuals are created. This can be useful if you want to time betweeninteractive
andcomplete
document.ready
state.In other words: Show visual content blockers in
interactive
state, and unblock incomplete
state.Use this in conjunction with
BANNER_PRE_DECISION_SHOW_INTERACTIVE_EVENT
andAPPLY_INTERACTIVE_EVENT
event.