A RetroSearch Logo

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

Search Query:

Showing content from https://webplatform.github.io/docs/css/cssom/CSSMediaRule/insertRule below:

insertRule · WebPlatform Docs

insertRule Summary

Inserts a new rule to a media block.

Method of css/cssom/CSSMediaRule/CSSMediaRulecss/cssom/CSSMediaRule/CSSMediaRule

Syntax
var ruleIndex = mediaRule.insertRule();
Parameters ruleText
Data-type
String

The parsable text that represents the rule. For rule sets, this contains both the selector and the style declaration. For at-rules, this specifies both the at-identifier and the rule content.

index
Data-type
Number

The index within the media block’s rule collection. The rule is inserted immediately before this index. If the specified index is equal to the length of the media block’s rule collection, the rule is added to the end of the media block.

Return Value

Returns an object of type NumberNumber

The index of the newly inserted rule within the media block’s rule collection.

Standards information Related specifications
DOM Level 2 Style
Recommendation
See also Related articles CSSOM Related pages Attributions

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