scroll-into-view / compute-scroll-into-view

Utility for calculating what should be scrolled, how it's scrolled is up to you
https://scroll-into-view.dev#scroll-alignment
MIT License
313 stars 27 forks source link

Methods outside of compute lost context #910

Closed udarrr closed 11 months ago

udarrr commented 11 months ago

Hi @stipsan. Generally i'd like to try to connect it to 'webdriver io' package. But issue is when i'd like to execute the script in context of browser from nodejs where webdriver io works, refers to methods outside of 'compute' lost. Could we move all the functions declaration like canOverflow, getFrameElement, isHiddenByFrame, isScrollable, alignNearest, getParentElement, getScrollMargins to inside of 'compute'? As the methods not exported I believe it doesn't affect something,