A RetroSearch Logo

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

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/CSSNamespaceRule/prefix below:

CSSNamespaceRule: prefix property - Web APIs

CSSNamespaceRule: prefix property

Baseline Widely available

The read-only prefix property of the CSSNamespaceRule returns a string with the name of the prefix associated to this namespace. If there is no such prefix, it returns an empty string.

Value

A string containing the prefix associated to this namespace. If there is no prefix an empty string.

Examples

The stylesheet includes two namespace rules. The first has no prefix the second the prefix svg. Two CSSNamespaceRule objects will be returned. The value of the prefix property for the first will be an empty string, for the second svg.

@namespace url("http://www.w3.org/1999/xhtml");
@namespace svg url("http://www.w3.org/2000/svg");
let myRules = document.styleSheets[0].cssRules;
console.log(myRules[0].namespaceURI); // an empty string ""
console.log(myRules[1].namespaceURI); // "svg"
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