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

132
Vistas
Access / read adoptedStyleSheets

For a project, I would like to access all adoptedStyleSheets that got passed to a document or shadow root. I don't have any reference to stylesheet itself in this scenario.

const sheet = new CSSStyleSheet();
someShadowRoot.adoptedStyleSheets = [ sheet ];

Is there any documented way to access or read the adoptedStyleSheets?

For more information, I'm talking about https://web.dev/constructable-stylesheets/

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Simply printing the adoptedStyleSheets didn't work, so I did not proceed further. It turned out that iterating through the array did actually do the trick.

for (let i = 0; i < document.adoptedStyleSheets.length; i++) {
    console.log(document.adoptedStyleSheets[i]);
}

Thanks to @Justinas for pointing out the obvious.

about 4 years ago · Juan Pablo Isaza Denunciar
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