working with LitElement and in shadow dom. I used to have this code in light dom:
const {scrollHeight,scrollTop,clientHeight} = document.documentElement;
When I switched to using shadow dom, this.shadowRoot.documentElement breaks.
firstElemementChild seems to work. But is it equivalent?
const {scrollHeight,scrollTop,clientHeight} = this.shadowRoot.firstElementChild;
What's the best way of working with scrollHeight, scrollTop, etc document properties when in shadowroot?
Thanks!