Skip to main content
export declare function scrollToLoadContent(input: {
  source: Page | Locator;
  onScrollProgress?: CallableFunction;
  maxScrolls?: number;
  delayInMs?: number;
  minHeightChange?: number;
}): Promise<void>;
Automatically scrolls through infinite scroll content by repeatedly scrolling to the bottom until no new content loads or maximum scroll limit is reached.

Examples

import { scrollToLoadContent } from "@intuned/browser";
export default async function handler(params, page, context){
// Scroll through entire page content
await page.goto("https://docs.intunedhq.com/docs-old/getting-started/introduction")
await scrollToLoadContent({
  source: page,
});
// Now all content is loaded and visible
}

Arguments

input
Object
required
The input object containing the data to scroll to load content

Returns: Promise<void>

Promise that resolves when scrolling is complete