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 MediaDevicesmediaDevices_private MimeTypeArraymimeTypes_private PluginArrayplugins_
-
Constructor Summary
Constructors Constructor Description Navigator()Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAppCodeName()Returns theappCodeNameproperty.java.lang.StringgetAppName()Returns theappNameproperty.java.lang.StringgetAppVersion()Returns theappVersionproperty.java.lang.StringgetBuildID()Returns thebuildIDproperty.NetworkInformationgetConnection()Returns theconnectionproperty.java.lang.ObjectgetDoNotTrack()Returns thedoNotTrackproperty.GeolocationgetGeolocation()Returns thegeolocationproperty.java.lang.StringgetLanguage()Returns the language of the browser.org.htmlunit.corejs.javascript.ScriptablegetLanguages()Returns the language of the browser.MediaDevicesgetMediaDevices()Returns themimeTypesproperty.java.lang.ObjectgetMimeTypes()Returns themimeTypesproperty.java.lang.StringgetOscpu()Returns theoscpuproperty.java.lang.StringgetPlatform()Returns theplatformproperty.java.lang.ObjectgetPlugins()Returns an empty array because HtmlUnit does not support embedded objects.java.lang.StringgetProduct()Returns theproductproperty.java.lang.StringgetProductSub()Returns the build number of the current browser.java.lang.StringgetUserAgent()Returns the propertyuserAgent.java.lang.StringgetVendor()Returns thevendorproperty.java.lang.StringgetVendorSub()Returns thevendorSubproperty.private voidinitPlugins()booleanisCookieEnabled()Returns thecookieEnabledproperty.booleanisOnLine()Returns theonLineproperty.booleanjavaEnabled()Indicates if Java is enabled.voidjsConstructor()JavaScript constructor.booleantaintEnabled()Returnsfalsealways 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 theappCodeNameproperty.- Returns:
- the
appCodeNameproperty
-
getAppName
public java.lang.String getAppName()
Returns theappNameproperty.- Returns:
- the
appNameproperty
-
getAppVersion
public java.lang.String getAppVersion()
Returns theappVersionproperty.- Returns:
- the
appVersionproperty
-
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 thecookieEnabledproperty.- Returns:
- the
cookieEnabledproperty
-
isOnLine
public boolean isOnLine()
Returns theonLineproperty.- Returns:
- the
onLineproperty
-
getPlatform
public java.lang.String getPlatform()
Returns theplatformproperty.- Returns:
- the
platformproperty
-
getProduct
public java.lang.String getProduct()
Returns theproductproperty.- Returns:
- the
productproperty
-
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 themimeTypesproperty.- Returns:
- the
mimeTypesproperty
-
javaEnabled
public boolean javaEnabled()
Indicates if Java is enabled.- Returns:
- false
-
taintEnabled
public boolean taintEnabled()
Returnsfalsealways as data tainting support is not enabled in HtmlUnit.- Returns:
- false
-
getGeolocation
public Geolocation getGeolocation()
Returns thegeolocationproperty.- Returns:
- the
geolocationproperty
-
getBuildID
public java.lang.String getBuildID()
Returns thebuildIDproperty.- Returns:
- the
buildIDproperty
-
getVendor
public java.lang.String getVendor()
Returns thevendorproperty.- Returns:
- the
vendorproperty
-
getVendorSub
public java.lang.String getVendorSub()
Returns thevendorSubproperty.- Returns:
- the
vendorSubproperty
-
getDoNotTrack
public java.lang.Object getDoNotTrack()
Returns thedoNotTrackproperty.- Returns:
- the
doNotTrackproperty
-
getOscpu
public java.lang.String getOscpu()
Returns theoscpuproperty.- Returns:
- the
oscpuproperty
-
getConnection
public NetworkInformation getConnection()
Returns theconnectionproperty.- Returns:
- the
connectionproperty
-
getMediaDevices
public MediaDevices getMediaDevices()
Returns themimeTypesproperty.- Returns:
- the
mimeTypesproperty
-
-