@tripo3d/fingerprint / withIframe
Function: withIframe()
ts
function withIframe<T>(
action,
initialHtml?,
domPollInterval?): Promise<T>;Defined in: utils/dom.ts:29
Creates and keeps an invisible iframe while the given function runs. The given function is called when the iframe is loaded and has a body. The iframe allows to measure DOM sizes inside itself.
Notice: passing an initial HTML code doesn't work in IE.
Warning for package users: This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Default value |
|---|---|---|
action | (iframe, iWindow) => MaybePromise<T> | undefined |
initialHtml? | string | undefined |
domPollInterval? | number | 50 |
Returns
Promise<T>