com.meterware.httpunit.dom
Class HTMLDocumentImpl

java.lang.Object
  extended by org.mozilla.javascript.ScriptableObject
      extended by com.meterware.httpunit.javascript.ScriptingEngineImpl
          extended by com.meterware.httpunit.dom.AbstractDomComponent
              extended by com.meterware.httpunit.dom.NodeImpl
                  extended by com.meterware.httpunit.dom.DocumentImpl
                      extended by com.meterware.httpunit.dom.HTMLDocumentImpl
All Implemented Interfaces:
HTMLContainerElement, ScriptingEngine, ScriptingEventHandler, ScriptingHandler, java.io.Serializable, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable, org.w3c.dom.Document, org.w3c.dom.html.HTMLDocument, org.w3c.dom.Node

public class HTMLDocumentImpl
extends DocumentImpl
implements org.w3c.dom.html.HTMLDocument, HTMLContainerElement

Author:
Russell Gold
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface org.w3c.dom.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 interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
HTMLDocumentImpl()
           
 
Method Summary
 void clearWriteBuffer()
           
 org.w3c.dom.Node cloneNode(boolean deep)
           
 void close()
           
 org.w3c.dom.Element createElement(java.lang.String tagName)
           
 org.w3c.dom.Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
           
 java.lang.Object get(java.lang.String propertyName, org.mozilla.javascript.Scriptable scriptable)
           
 org.w3c.dom.html.HTMLCollection getAnchors()
           
 org.w3c.dom.html.HTMLCollection getApplets()
           
 org.w3c.dom.html.HTMLElement getBody()
           
 java.lang.String getCookie()
           
 java.lang.String getDomain()
           
 org.w3c.dom.NodeList getElementsByName(java.lang.String elementName)
           
 org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
           
 org.w3c.dom.html.HTMLCollection getForms()
           
 org.w3c.dom.html.HTMLCollection getImages()
           
 org.w3c.dom.html.HTMLCollection getLinks()
           
 java.lang.String getReferrer()
           
 java.lang.String getTitle()
           
 java.lang.String getURL()
           
 DomWindow getWindow()
          get the Window
 void open()
           
 void put(java.lang.String propertyName, org.mozilla.javascript.Scriptable initialObject, java.lang.Object value)
           
 void setBody(org.w3c.dom.html.HTMLElement body)
           
 void setCookie(java.lang.String cookie)
           
 void setIFramesEnabled(boolean enabled)
           
 void setTitle(java.lang.String title)
           
 void write(java.lang.String text)
           
 void writeln(java.lang.String text)
           
 
Methods inherited from class com.meterware.httpunit.dom.DocumentImpl
adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagNameNS, getImplementation, getInputEncoding, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getStrictErrorChecking, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, initialize, normalizeDocument, renameNode, setDocumentURI, setNodeValue, setStrictErrorChecking, setXmlStandalone, setXmlVersion
 
Methods inherited from class com.meterware.httpunit.dom.NodeImpl
appendChild, compareDocumentPosition, getAttributes, getBaseURI, getChildIfPermitted, getChildNodes, getElementsByTagNames, getFeature, getFirstChild, getJavaPropertyName, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, initialize, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, preOrderIterator, preOrderIterator, preOrderIteratorAfterNode, preOrderIteratorAfterNode, removeChild, replaceChild, setPrefix, setTextContent, setUserData
 
Methods inherited from class com.meterware.httpunit.dom.AbstractDomComponent
clearCaches, createAnonymousFunctionName, getClassName, has, newScriptingEngine
 
Methods inherited from class com.meterware.httpunit.javascript.ScriptingEngineImpl
clearErrorMessages, discardDocumentWriteBuffer, doEvent, doEventScript, evaluateExpression, getDocumentWriteBuffer, getErrorMessages, handleEvent, handleScriptException, runScript, supportsScriptLanguage
 
Methods inherited from class org.mozilla.javascript.ScriptableObject
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, hasInstance, hasProperty, hasProperty, isConst, isGetterOrSetter, isSealed, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Document
adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagNameNS, getImplementation, getInputEncoding, getStrictErrorChecking, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, normalizeDocument, renameNode, setDocumentURI, setStrictErrorChecking, setXmlStandalone, setXmlVersion
 
Methods inherited from interface org.w3c.dom.Node
appendChild, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 
Methods inherited from interface org.mozilla.javascript.Scriptable
delete, delete, get, getDefaultValue, getIds, getParentScope, getPrototype, has, hasInstance, put, setParentScope, setPrototype
 

Constructor Detail

HTMLDocumentImpl

public HTMLDocumentImpl()
Method Detail

setIFramesEnabled

public void setIFramesEnabled(boolean enabled)

get

public java.lang.Object get(java.lang.String propertyName,
                            org.mozilla.javascript.Scriptable scriptable)
Specified by:
get in interface org.mozilla.javascript.Scriptable
Overrides:
get in class AbstractDomComponent

put

public void put(java.lang.String propertyName,
                org.mozilla.javascript.Scriptable initialObject,
                java.lang.Object value)
Specified by:
put in interface org.mozilla.javascript.Scriptable
Overrides:
put in class AbstractDomComponent

getLinks

public org.w3c.dom.html.HTMLCollection getLinks()
Specified by:
getLinks in interface HTMLContainerElement
Specified by:
getLinks in interface org.w3c.dom.html.HTMLDocument

getImages

public org.w3c.dom.html.HTMLCollection getImages()
Specified by:
getImages in interface HTMLContainerElement
Specified by:
getImages in interface org.w3c.dom.html.HTMLDocument

getApplets

public org.w3c.dom.html.HTMLCollection getApplets()
Specified by:
getApplets in interface HTMLContainerElement
Specified by:
getApplets in interface org.w3c.dom.html.HTMLDocument

getForms

public org.w3c.dom.html.HTMLCollection getForms()
Specified by:
getForms in interface HTMLContainerElement
Specified by:
getForms in interface org.w3c.dom.html.HTMLDocument

getAnchors

public org.w3c.dom.html.HTMLCollection getAnchors()
Specified by:
getAnchors in interface HTMLContainerElement
Specified by:
getAnchors in interface org.w3c.dom.html.HTMLDocument

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface org.w3c.dom.html.HTMLDocument

setTitle

public void setTitle(java.lang.String title)
Specified by:
setTitle in interface org.w3c.dom.html.HTMLDocument

getReferrer

public java.lang.String getReferrer()
Specified by:
getReferrer in interface org.w3c.dom.html.HTMLDocument

getDomain

public java.lang.String getDomain()
Specified by:
getDomain in interface org.w3c.dom.html.HTMLDocument

getURL

public java.lang.String getURL()
Specified by:
getURL in interface org.w3c.dom.html.HTMLDocument

getBody

public org.w3c.dom.html.HTMLElement getBody()
Specified by:
getBody in interface org.w3c.dom.html.HTMLDocument

setBody

public void setBody(org.w3c.dom.html.HTMLElement body)
Specified by:
setBody in interface org.w3c.dom.html.HTMLDocument

getCookie

public java.lang.String getCookie()
Specified by:
getCookie in interface org.w3c.dom.html.HTMLDocument

setCookie

public void setCookie(java.lang.String cookie)
Specified by:
setCookie in interface org.w3c.dom.html.HTMLDocument

open

public void open()
Specified by:
open in interface org.w3c.dom.html.HTMLDocument

close

public void close()
Specified by:
close in interface org.w3c.dom.html.HTMLDocument

write

public void write(java.lang.String text)
Specified by:
write in interface org.w3c.dom.html.HTMLDocument

writeln

public void writeln(java.lang.String text)
Specified by:
writeln in interface org.w3c.dom.html.HTMLDocument

getElementsByName

public org.w3c.dom.NodeList getElementsByName(java.lang.String elementName)
Specified by:
getElementsByName in interface org.w3c.dom.html.HTMLDocument

createElement

public org.w3c.dom.Element createElement(java.lang.String tagName)
                                  throws org.w3c.dom.DOMException
Specified by:
createElement in interface org.w3c.dom.Document
Overrides:
createElement in class DocumentImpl
Throws:
org.w3c.dom.DOMException

createElementNS

public org.w3c.dom.Element createElementNS(java.lang.String namespaceURI,
                                           java.lang.String qualifiedName)
                                    throws org.w3c.dom.DOMException
Specified by:
createElementNS in interface org.w3c.dom.Document
Overrides:
createElementNS in class DocumentImpl
Throws:
org.w3c.dom.DOMException

getElementsByTagName

public org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
Specified by:
getElementsByTagName in interface org.w3c.dom.Document
Overrides:
getElementsByTagName in class NodeImpl

cloneNode

public org.w3c.dom.Node cloneNode(boolean deep)
Specified by:
cloneNode in interface org.w3c.dom.Node
Overrides:
cloneNode in class NodeImpl

getWindow

public DomWindow getWindow()
get the Window

Returns:
the window

clearWriteBuffer

public void clearWriteBuffer()


Copyright © 2011. All Rights Reserved.