Class Navigator

java.lang.Object
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.javascript.HtmlUnitScriptable
org.htmlunit.javascript.host.Navigator
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 Navigator extends HtmlUnitScriptable
A JavaScript object for Navigator.
See Also:
  • Field Details

  • Constructor Details

    • Navigator

      public Navigator()
      Creates an instance.
  • Method Details

    • jsConstructor

      public void jsConstructor()
      JavaScript constructor.
    • getAppCodeName

      public String getAppCodeName()
      Returns the appCodeName property.
      Returns:
      the appCodeName property
    • getAppName

      public String getAppName()
      Returns the appName property.
      Returns:
      the appName property
    • getAppVersion

      public String getAppVersion()
      Returns the appVersion property.
      Returns:
      the appVersion property
    • getLanguage

      public String getLanguage()
      Returns the language of the browser.
      Returns:
      the language
    • getLanguages

      public org.htmlunit.corejs.javascript.Scriptable getLanguages()
      Returns the language of the browser.
      Returns:
      the language
    • isCookieEnabled

      public boolean isCookieEnabled()
      Returns the cookieEnabled property.
      Returns:
      the cookieEnabled property
    • isOnLine

      public boolean isOnLine()
      Returns the onLine property.
      Returns:
      the onLine property
    • getPlatform

      public String getPlatform()
      Returns the platform property.
      Returns:
      the platform property
    • getProduct

      public String getProduct()
      Returns the product property.
      Returns:
      the product property
    • getProductSub

      public String getProductSub()
      Returns the build number of the current browser.
      Returns:
      false
      See Also:
    • getUserAgent

      public String getUserAgent()
      Returns the property userAgent.
      Returns:
      the property userAgent
    • getPlugins

      public Object getPlugins()
      Returns an empty array because HtmlUnit does not support embedded objects.
      Returns:
      an empty array
    • initPlugins

      private void initPlugins()
    • getMimeTypes

      public Object getMimeTypes()
      Returns the mimeTypes property.
      Returns:
      the mimeTypes property
    • javaEnabled

      public boolean javaEnabled()
      Indicates if Java is enabled.
      Returns:
      false
    • taintEnabled

      public boolean taintEnabled()
      Returns false always as data tainting support is not enabled in HtmlUnit.
      Returns:
      false
    • getGeolocation

      public Geolocation getGeolocation()
      Returns the geolocation property.
      Returns:
      the geolocation property
    • getBuildID

      public String getBuildID()
      Returns the buildID property.
      Returns:
      the buildID property
    • getVendor

      public String getVendor()
      Returns the vendor property.
      Returns:
      the vendor property
    • getVendorSub

      public String getVendorSub()
      Returns the vendorSub property.
      Returns:
      the vendorSub property
    • getDoNotTrack

      public Object getDoNotTrack()
      Returns the doNotTrack property.
      Returns:
      the doNotTrack property
    • getOscpu

      public String getOscpu()
      Returns the oscpu property.
      Returns:
      the oscpu property
    • getConnection

      public NetworkInformation getConnection()
      Returns the connection property.
      Returns:
      the connection property
    • getMediaDevices

      public MediaDevices getMediaDevices()
      Returns the mimeTypes property.
      Returns:
      the mimeTypes property