'I want to figure out the scroll depth

I'm building a widget that users add to their website using code snippets.

I want the widget to appear only at certain scroll depth set by user. Can somehow help me figure out how to identify the scroll depth of a page in a preact/ react application.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source