com.gargoylesoftware.htmlunit.javascript.host
Class History

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.History
All Implemented Interfaces:
Serializable, Cloneable, Map, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class History
extends SimpleScriptable

A JavaScript object for the client's browsing history.

Version:
$Revision: 5864 $
Author:
Mike Bowler, Chris Erskine, Daniel Gredler
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
History()
          Creates an instance.
 
Method Summary
 Object get(int index, net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
          
 Object[] getIds()
          
 boolean has(int index, net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
          
 void jsxFunction_back()
          JavaScript function "back".
 void jsxFunction_forward()
          JavaScript function "forward".
 void jsxFunction_go(int relativeIndex)
          JavaScript function "go".
 String jsxFunction_item(int index)
          JavaScript function "item".
 String jsxGet_current()
          Returns the "current" property.
 int jsxGet_length()
          Returns the "length" property.
 String jsxGet_next()
          Returns the "next" property.
 String jsxGet_previous()
          Returns the "previous" property.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElement
 
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, clear, containsKey, containsValue, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, entrySet, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypeOf, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, keySet, preventExtensions, put, put, put, putAll, putConst, putConstProperty, putProperty, putProperty, redefineProperty, remove, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size, values
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

History

public History()
Creates an instance. JavaScript objects must have a default constructor.

Method Detail

getIds

public Object[] getIds()

Specified by:
getIds in interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
Overrides:
getIds in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject

has

public boolean has(int index,
                   net.sourceforge.htmlunit.corejs.javascript.Scriptable start)

Specified by:
has in interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
Overrides:
has in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject

get

public Object get(int index,
                  net.sourceforge.htmlunit.corejs.javascript.Scriptable start)

Specified by:
get in interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
Overrides:
get in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject

jsxGet_length

public int jsxGet_length()
Returns the "length" property.

Returns:
the "length" property

jsxFunction_back

public void jsxFunction_back()
JavaScript function "back".


jsxFunction_forward

public void jsxFunction_forward()
JavaScript function "forward".


jsxFunction_go

public void jsxFunction_go(int relativeIndex)
JavaScript function "go".

Parameters:
relativeIndex - the relative index

jsxGet_current

public String jsxGet_current()
Returns the "current" property.

Returns:
the "current" property

jsxGet_previous

public String jsxGet_previous()
Returns the "previous" property.

Returns:
the "previous" property

jsxGet_next

public String jsxGet_next()
Returns the "next" property.

Returns:
the "next" property

jsxFunction_item

public String jsxFunction_item(int index)
JavaScript function "item".

Parameters:
index - the index
Returns:
the URL of the history item at the specified index


Copyright © 2002-2011 Gargoyle Software Inc.. All Rights Reserved.