Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

184
Vistas
Working with DOM properties like scrollHeight, scrollTop in shadow DOM

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!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda