@wordpress/dom
Version:
DOM utilities module for WordPress.
12 lines • 574 B
TypeScript
/**
* If no range range can be created or it is outside the container, the element
* may be out of view, so scroll it into view and try again.
*
* @param {HTMLElement} container The container to scroll.
* @param {boolean} alignToTop True to align to top, false to bottom.
* @param {Function} callback The callback to create the range.
*
* @return {?Range} The range returned by the callback.
*/
export function scrollIfNoRange(container: HTMLElement, alignToTop: boolean, callback: Function): Range | null;
//# sourceMappingURL=scroll-if-no-range.d.ts.map