Skip to content

@get-advantage/advantage / utils/misc

Module: utils/misc

Functions

collectIframes

collectIframes(node): HTMLIFrameElement[]

Collects all the iframes within a given node and its children.

Parameters

NameTypeDescription
nodeNodeThe node to start collecting iframes from.

Returns

HTMLIFrameElement[]

An array of HTMLIFrameElement objects representing the iframes found.

Defined in

src/utils/misc.ts:6


traverseNodes

traverseNodes(node, func): void

Traverses the DOM tree starting from a given node and applies a function to each element node.

Parameters

NameTypeDescription
nodeNodeThe starting node for traversal.
func(node: HTMLElement) => voidThe function to be applied to each element node.

Returns

void

Defined in

src/utils/misc.ts:32