setScrollRootElement method

Class: ConfigurationPlatform: PuppeteerLanguage: JavaScript SDK:

Use this method to set the element to which setHideScrollbars will be applied.

Syntax

let configval = config.setScrollRootElement(scrollRootElement_ele);

let configval = config.setScrollRootElement(scrollRootElement_sel);
config.scrollRootElement = configval;
configval = config.scrollRootElement;

Note that this feature is available as both a method and a property.

Parameters

scrollRootElement_ele
Type:ElementHandle

The element that should be scrolled.

An element whose position and bounding rectangle defines the region.

scrollRootElement_sel
Type:Selector

The element that should be scrolled.

A selector to an element whose position and bounding rectangle defines the region.

Type definitions

Selector
Used to identify an HTML element defined as string|{selector:string;type:string}.

Return value

Type: Configuration