A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/CSSStyleRule/selectorText below:

CSSStyleRule: selectorText property - Web APIs

CSSStyleRule: selectorText property

Baseline Widely available

The selectorText property of the CSSStyleRule interface gets and sets the selectors associated with the CSSStyleRule.

Value

A string.

Examples

The CSS includes one style rule. This will be the first CSSRule returned by document.styleSheets[0].cssRules. myRules[0].selectorText therefore returns a literal string of the selector, in this case "h1".

let myRules = document.styleSheets[0].cssRules;
console.log(myRules[0].selectorText); // a string containing "h1".
Specifications Browser compatibility

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4