Package | dom.style.css |
Class | public class CSSMediaRule |
Inheritance | CSSMediaRule CSSRule Object |
Introduced in: | DOM 2 Core |
See also
Property | Defined By | ||
---|---|---|---|
DOM 2 Style cssRules : CSSRuleList [read-only]
A list of all CSS rules contained within the media block. | CSSMediaRule | ||
DOM 2 Style cssText : DOMString [read-only]
The parsable textual representation of the rule. | CSSRule | ||
DOM 2 Style media : MediaList [read-only]
A list of media types for this rule. | CSSMediaRule | ||
DOM 2 Style parentRule : CSSRule [read-only]
If this rule is contained inside another rule (e.g. | CSSRule | ||
DOM 2 Style parentStyleSheet : CSSStyleSheet [read-only]
The style sheet that contains this rule. | CSSRule | ||
DOM 2 Style type : Number [read-only]
The type of the rule, as defined above. | CSSRule |
Method | Defined By | ||
---|---|---|---|
DOM 2 Style deleteRule(index:Number):void
Used to delete a rule from the media block. | CSSMediaRule | ||
Used to insert a new rule into the media block. | CSSMediaRule |
DOM 2 Style cssRules | property |
cssRules:CSSRuleList
[read-only] Introduced in: | DOM 2 Core |
A list of all CSS rules contained within the media block.
public function get cssRules():CSSRuleList
See also
DOM 2 Style media | property |
media:MediaList
[read-only] Introduced in: | DOM 2 Core |
A list of media types for this rule.
public function get media():MediaList
See also
DOM 2 Style deleteRule | () | method |
public function deleteRule(index:Number):void
Introduced in: | DOM 2 Core |
Used to delete a rule from the media block.
Parameters
index:Number — The index within the media block's rule collection of the rule to remove.
|
DOMException — INDEX_SIZE_ERR: Raised if the specified index does not correspond
to a rule in the media rule list.
| |
DOMException — NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is readonly.
|
See also
DOM 2 Style insertRule | () | method |
public function insertRule(rule:DOMString, index:Number):Number
Introduced in: | DOM 2 Core |
Used to insert a new rule into the media block.
Parameters
rule:DOMString — The parsable text representing 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:Number — The index within the media block's rule collection of the rule before which
to insert the specified rule. If the specified index is equal to the length of the media
blocks's rule collection, the rule will be added to the end of the media block.
|
Number — The index within the media block's rule collection of the newly inserted rule.
|
DOMException — HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at the specified
index, e.g., if an @import rule is inserted after a standard rule set or other at-rule.
| |
DOMException — INDEX_SIZE_ERR: Raised if the specified index is not a valid insertion point.
| |
DOMException — NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is readonly.
| |
DOMException — SYNTAX_ERR: Raised if the specified rule has a syntax error and is unparsable.
|
See also