Document.styleSheets
Resumen
Devuelve una lista de objetos de tipo stylesheet para las hojas de estilo que están específicamente enlazadas o contenidas en el documento.
Propiedades
styleSheetList.length
- devuelve el número de objetos de tipo stylesheet contenidos en el objeto.
Sintaxis
js
styleSheetList = document.styleSheets;
El objeto devuelto es del tipo StyleSheetList.
Es una colección ordenada de objetos de tipo stylesheet. styleSheetList.item(index)
o simplemente styleSheetList[ index ]
devuelve un único objeto de tipo stylesheet con el índice especificado (el índice es de origen 0).
Especificaciones
Specification |
---|
CSS Object Model (CSSOM) # dom-documentorshadowroot-stylesheets |
Compatibilidad del Navegador
BCD tables only load in the browser