UNPKG

@codingheads/sticky-header

Version:

A library that allows you to create sticky headers. It uses `position: sticky` and IntersectionObserver

22 lines (21 loc) 846 B
/** @format */ /** * Run a callback when the document.readyState has a certain value * @param {string|string[]} state - the state(s) when to run the callback * @param {Function} callback - the callback to run */ export declare const onReadyState: (state: string | string[], callback: Function) => void; /** * Run a callback when the document.readyState is 'complete' * (DOM + assets are loaded) * @param {Function} callback - the callback to run */ export declare const onComplete: (callback: Function) => void; /** * Run a callback when the document.readyState is 'interactive' * (DOM is loaded - equivalent to DOMContentLoaded) * @param {Function} callback - the callback to run */ export declare const onInteractive: (callback: Function) => void; export declare const onReady: (callback: Function) => void; export default onReady;