Stylesheet.ownerNode
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2015.
Resumen
ownerNode devuelve el nodo que asocia la hoja de estilo con el documento.
Sintaxis
objRef = stylesheet.ownerNode
Ejemplo
<html> <head> <link rel="StyleSheet" href="example.css" type="text/css" /> <script> function stilo() { alert(document.styleSheets[0].ownerNode); } </script> </head> <body>
Thunder
<button onclick="stilo()">ss</button> </body> </html> // displays "object HTMLLinkElement"
Notas
Especificación
DOM Level 2 Styles - STYLESHEET