|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.htmlunit.corejs.javascript.ScriptableObject
com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
com.gargoylesoftware.htmlunit.javascript.host.Node
com.gargoylesoftware.htmlunit.javascript.host.EventNode
com.gargoylesoftware.htmlunit.javascript.host.Document
public class Document
A JavaScript object for a Document.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.Node |
---|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
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 | |
---|---|
Document()
|
Method Summary | |
---|---|
protected SgmlPage |
getPage()
Returns the page that this document is modeling. |
void |
jsxFunction_captureEvents(String type)
Does nothing special anymore... |
Attr |
jsxFunction_createAttribute(String attributeName)
Creates a new HTML attribute with the specified name. |
Object |
jsxFunction_createComment(String comment)
Creates a new Comment. |
Object |
jsxFunction_createDocumentFragment()
Creates a new document fragment. |
Object |
jsxFunction_createElement(String tagName)
Create a new HTML element with the given tag name. |
Object |
jsxFunction_createElementNS(String namespaceURI,
String qualifiedName)
Creates a new HTML element with the given tag name, and name. |
XPathNSResolver |
jsxFunction_createNSResolver(Node nodeResolver)
Adapts any DOM node to resolve namespaces so that an XPath expression can be easily evaluated relative to the context of the node where it appeared within the document. |
Object |
jsxFunction_createTextNode(String newData)
Create a new DOM text node with the given data. |
XPathResult |
jsxFunction_evaluate(String expression,
Node contextNode,
Object resolver,
int type,
Object result)
Evaluates an XPath expression string and returns a result of the specified type if possible. |
BoxObject |
jsxFunction_getBoxObjectFor(HTMLElement element)
Returns the BoxObject for the specific element. |
HTMLCollection |
jsxFunction_getElementsByTagName(String tagName)
Returns all the descendant elements with the specified tag name. |
Object |
jsxFunction_getElementsByTagNameNS(Object namespaceURI,
String localName)
Returns a list of elements with the given tag name belonging to the given namespace. |
Object |
jsxFunction_importNode(Node importedNode,
boolean deep)
Imports a node from another document to this document. |
Object |
jsxGet_defaultView()
Gets the window in which this document is contained. |
String |
jsxGet_designMode()
Returns a value which indicates whether or not the document can be edited. |
SimpleScriptable |
jsxGet_doctype()
Gets the JavaScript property "doctype" for the document. |
Element |
jsxGet_documentElement()
Gets the JavaScript property "documentElement" for the document. |
DOMImplementation |
jsxGet_implementation()
Returns the implementation object of the current document. |
Location |
jsxGet_location()
Returns the value of the "location" property. |
String |
jsxGet_referrer()
Returns the value of the "referrer" property. |
void |
jsxSet_designMode(String mode)
Sets a value which indicates whether or not the document can be edited. |
void |
jsxSet_location(String location)
Sets the value of the "location" property. |
void |
setWindow(Window window)
Sets the Window JavaScript object that encloses this document. |
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, 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, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypeOf, has, 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 |
---|
public Document()
Method Detail |
---|
public void setWindow(Window window)
window
- the Window JavaScript object that encloses this documentpublic Location jsxGet_location()
public void jsxSet_location(String location) throws IOException
location
- the location to navigate to
IOException
- when location loading failspublic String jsxGet_referrer()
public Element jsxGet_documentElement()
public SimpleScriptable jsxGet_doctype()
public String jsxGet_designMode()
public void jsxSet_designMode(String mode)
mode
- a value which indicates whether or not the document can be editedprotected SgmlPage getPage()
public Object jsxGet_defaultView()
public Object jsxFunction_createDocumentFragment()
public Attr jsxFunction_createAttribute(String attributeName)
attributeName
- the name of the attribute to create
public BoxObject jsxFunction_getBoxObjectFor(HTMLElement element)
BoxObject
for the specific element.
element
- target for BoxObject
public Object jsxFunction_importNode(Node importedNode, boolean deep)
importedNode
- the node to importdeep
- Whether to recursively import the subtree under the specified node; or not
public DOMImplementation jsxGet_implementation()
public void jsxFunction_captureEvents(String type)
type
- the type of events to captureWindow.jsxFunction_captureEvents(String)
public XPathNSResolver jsxFunction_createNSResolver(Node nodeResolver)
nodeResolver
- the node to be used as a context for namespace resolution
public Object jsxFunction_createTextNode(String newData)
newData
- the string value for the text node
public Object jsxFunction_createComment(String comment)
comment
- the comment text
public XPathResult jsxFunction_evaluate(String expression, Node contextNode, Object resolver, int type, Object result)
expression
- the XPath expression string to be parsed and evaluatedcontextNode
- the context node for the evaluation of this XPath expressionresolver
- the resolver permits translation of all prefixes, including the XML namespace prefix,
within the XPath expression into appropriate namespace URIs.type
- If a specific type is specified, then the result will be returned as the corresponding typeresult
- the result object which may be reused and returned by this method
public Object jsxFunction_createElement(String tagName)
tagName
- the tag name
public Object jsxFunction_createElementNS(String namespaceURI, String qualifiedName)
namespaceURI
- the URI that identifies an XML namespacequalifiedName
- the qualified name of the element type to instantiate
public HTMLCollection jsxFunction_getElementsByTagName(String tagName)
tagName
- the name to search for
public Object jsxFunction_getElementsByTagNameNS(Object namespaceURI, String localName)
namespaceURI
- the namespace URI of elements to look forlocalName
- is either the local name of elements to look for or the special value "*",
which matches all elements.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |