Class CSSMediaRule

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.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:
    MDN doc, Serialized Form
    • Constructor Detail

      • 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 Detail

      • 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