Package org.htmlunit.javascript.host
Class Navigator
- java.lang.Object
-
- org.htmlunit.corejs.javascript.ScriptableObject
-
- org.htmlunit.javascript.HtmlUnitScriptable
-
- org.htmlunit.javascript.host.Navigator
-
- 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 Navigator extends HtmlUnitScriptable
A JavaScript object forNavigator
.- See Also:
- MSDN documentation, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private MediaDevices
mediaDevices_
private MimeTypeArray
mimeTypes_
private PluginArray
plugins_
-
Constructor Summary
Constructors Constructor Description Navigator()
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAppCodeName()
Returns theappCodeName
property.java.lang.String
getAppName()
Returns theappName
property.java.lang.String
getAppVersion()
Returns theappVersion
property.java.lang.String
getBuildID()
Returns thebuildID
property.NetworkInformation
getConnection()
Returns theconnection
property.java.lang.Object
getDoNotTrack()
Returns thedoNotTrack
property.Geolocation
getGeolocation()
Returns thegeolocation
property.java.lang.String
getLanguage()
Returns the language of the browser.org.htmlunit.corejs.javascript.Scriptable
getLanguages()
Returns the language of the browser.MediaDevices
getMediaDevices()
Returns themimeTypes
property.java.lang.Object
getMimeTypes()
Returns themimeTypes
property.java.lang.String
getOscpu()
Returns theoscpu
property.java.lang.String
getPlatform()
Returns theplatform
property.java.lang.Object
getPlugins()
Returns an empty array because HtmlUnit does not support embedded objects.java.lang.String
getProduct()
Returns theproduct
property.java.lang.String
getProductSub()
Returns the build number of the current browser.java.lang.String
getUserAgent()
Returns the propertyuserAgent
.java.lang.String
getVendor()
Returns thevendor
property.java.lang.String
getVendorSub()
Returns thevendorSub
property.private void
initPlugins()
boolean
isCookieEnabled()
Returns thecookieEnabled
property.boolean
isOnLine()
Returns theonLine
property.boolean
javaEnabled()
Indicates if Java is enabled.void
jsConstructor()
JavaScript constructor.boolean
taintEnabled()
Returnsfalse
always as data tainting support is not enabled in HtmlUnit.-
Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromise
-
Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
-
-
-
-
Field Detail
-
plugins_
private PluginArray plugins_
-
mimeTypes_
private MimeTypeArray mimeTypes_
-
mediaDevices_
private MediaDevices mediaDevices_
-
-
Method Detail
-
jsConstructor
public void jsConstructor()
JavaScript constructor.
-
getAppCodeName
public java.lang.String getAppCodeName()
Returns theappCodeName
property.- Returns:
- the
appCodeName
property
-
getAppName
public java.lang.String getAppName()
Returns theappName
property.- Returns:
- the
appName
property
-
getAppVersion
public java.lang.String getAppVersion()
Returns theappVersion
property.- Returns:
- the
appVersion
property
-
getLanguage
public java.lang.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 thecookieEnabled
property.- Returns:
- the
cookieEnabled
property
-
isOnLine
public boolean isOnLine()
Returns theonLine
property.- Returns:
- the
onLine
property
-
getPlatform
public java.lang.String getPlatform()
Returns theplatform
property.- Returns:
- the
platform
property
-
getProduct
public java.lang.String getProduct()
Returns theproduct
property.- Returns:
- the
product
property
-
getProductSub
public java.lang.String getProductSub()
Returns the build number of the current browser.- Returns:
- false
- See Also:
- Mozilla Doc
-
getUserAgent
public java.lang.String getUserAgent()
Returns the propertyuserAgent
.- Returns:
- the property
userAgent
-
getPlugins
public java.lang.Object getPlugins()
Returns an empty array because HtmlUnit does not support embedded objects.- Returns:
- an empty array
-
initPlugins
private void initPlugins()
-
getMimeTypes
public java.lang.Object getMimeTypes()
Returns themimeTypes
property.- Returns:
- the
mimeTypes
property
-
javaEnabled
public boolean javaEnabled()
Indicates if Java is enabled.- Returns:
- false
-
taintEnabled
public boolean taintEnabled()
Returnsfalse
always as data tainting support is not enabled in HtmlUnit.- Returns:
- false
-
getGeolocation
public Geolocation getGeolocation()
Returns thegeolocation
property.- Returns:
- the
geolocation
property
-
getBuildID
public java.lang.String getBuildID()
Returns thebuildID
property.- Returns:
- the
buildID
property
-
getVendor
public java.lang.String getVendor()
Returns thevendor
property.- Returns:
- the
vendor
property
-
getVendorSub
public java.lang.String getVendorSub()
Returns thevendorSub
property.- Returns:
- the
vendorSub
property
-
getDoNotTrack
public java.lang.Object getDoNotTrack()
Returns thedoNotTrack
property.- Returns:
- the
doNotTrack
property
-
getOscpu
public java.lang.String getOscpu()
Returns theoscpu
property.- Returns:
- the
oscpu
property
-
getConnection
public NetworkInformation getConnection()
Returns theconnection
property.- Returns:
- the
connection
property
-
getMediaDevices
public MediaDevices getMediaDevices()
Returns themimeTypes
property.- Returns:
- the
mimeTypes
property
-
-