Class MediaQueryList

  • 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 MediaQueryList
    extends EventTarget
    A JavaScript object for MediaQueryList.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject

        org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String media_  
      • Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject

        CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
      • Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable

        NOT_FOUND
    • Constructor Summary

      Constructors 
      Constructor Description
      MediaQueryList()
      Default constructor.
      MediaQueryList​(java.lang.String mediaQueryString)
      Constructor.
    • Field Detail

      • media_

        private java.lang.String media_
    • Constructor Detail

      • MediaQueryList

        public MediaQueryList()
        Default constructor.
      • MediaQueryList

        public MediaQueryList​(java.lang.String mediaQueryString)
        Constructor.
        Parameters:
        mediaQueryString - the media query string
    • Method Detail

      • getMedia

        public java.lang.String getMedia()
        Returns the media property.
        Returns:
        the media property
      • isMatches

        public boolean isMatches()
        Returns whether the document currently matches the media query list or not.
        Returns:
        whether the document currently matches the media query list or not
      • addListener

        public void addListener​(java.lang.Object listener)
        Adds the listener event handler for this element.
        Parameters:
        listener - the listener event handler for this element
      • removeListener

        public void removeListener​(java.lang.Object listener)
        Removes the listener event handler for this element.
        Parameters:
        listener - the listener event handler to be removed