@scandit/web-datacapture-id
Version:
Scandit Data Capture SDK for the Web
21 lines (20 loc) • 689 B
TypeScript
/**
* Safari triggers a page reload when too much memory is requested (RangeError: Out of memory).
* This detector tracks these reloads and reports them to the passed callback.
* Some data can also be set in the storage to give more context about the page when the error occurs.
*/
export declare class SafariOOMDetector<T extends {}> {
private _onPageAbruptlyReloaded;
private _storage;
constructor(onPageAbruptlyReloaded: () => void);
static isSafari(): boolean;
install(): void;
/**
* Update the data stored in the storage.
*/
updateData(data: T): void;
get data(): T;
uninstall(): void;
private getStorage;
private onUnload;
}