Class CSSMediaRule

All Implemented Interfaces:
Serializable, Cloneable, org.htmlunit.corejs.javascript.ConstProperties, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

public class CSSMediaRule extends CSSConditionRule
A JavaScript object for a CSSMediaRuleImpl.
See Also:
  • Field Details

  • Constructor Details

    • CSSMediaRule

      public CSSMediaRule()
      Creates a new instance.
    • CSSMediaRule

      protected CSSMediaRule(CSSStyleSheet stylesheet, org.htmlunit.cssparser.dom.CSSMediaRuleImpl rule)
      Creates a new instance.
      Parameters:
      stylesheet - the Stylesheet of this rule.
      rule - the wrapped rule
  • Method Details

    • jsConstructor

      public void jsConstructor()
      Creates an instance.
      Overrides:
      jsConstructor in class CSSConditionRule
    • getMedia

      public MediaList getMedia()
      Returns the media types that the imported CSS style sheet applies to.
      Returns:
      the media types that the imported CSS style sheet applies to
    • getMediaRule

      private org.htmlunit.cssparser.dom.CSSMediaRuleImpl getMediaRule()
      Returns the wrapped rule, as a media rule.
      Returns:
      the wrapped rule, as a media rule