MDN self-hosted library · e01.org

StyleSheet: ownerNode property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<link rel="stylesheet" href="example.css" />
js
console.log(document.styleSheets[0].ownerNode);
// Displays '<link rel="stylesheet" href="example.css">'