com.gargoylesoftware.htmlunit.javascript.host
Class DocumentFragment

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.Node
              extended by com.gargoylesoftware.htmlunit.javascript.host.DocumentFragment
All Implemented Interfaces:
Serializable, Cloneable, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class DocumentFragment
extends Node

A JavaScript object for DocumentFragment.

Version:
$Revision: 7457 $
Author:
Ahmed Ashour
See Also:
W3C Dom Level 1, Serialized Form

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
DocumentFragment()
           
 
Method Summary
 Object createAttribute(String attributeName)
          Creates a new HTML attribute with the specified name.
 Object createComment(String comment)
          Creates a new Comment.
 Object createDocumentFragment()
          Creates a new document fragment.
 Object createElement(String tagName)
          Create a new HTML element with the given tag name.
 Object createTextNode(String newData)
          Create a new DOM text node with the given data.
protected  HTMLDocument getDocument()
          Returns HTML document.
 Object getXml()
          Represents the xml content of the node and its descendants.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Node
addEventListener, appendChild, attachEvent, cloneNode, compareDocumentPosition, detachEvent, executeEvent, fireEvent, fireEvent, getAttributes, getChildNodes, getEventHandler, getEventHandlerProp, getFirstChild, getJavaScriptNode, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, getTextContent, hasChildNodes, hasEventHandlers, insertBefore, insertBeforeImpl, isSameNode, normalize, removeChild, removeEventListener, replaceChild, setDomNode, setEventHandler, setEventHandlerProp, setNodeValue, setTextContent
 
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, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setHtmlElement
 
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentFragment

public DocumentFragment()
Method Detail

getXml

public Object getXml()
Represents the xml content of the node and its descendants.

Overrides:
getXml in class Node
Returns:
the xml content of the node and its descendants

createAttribute

public Object createAttribute(String attributeName)
Creates a new HTML attribute with the specified name.

Parameters:
attributeName - the name of the attribute to create
Returns:
an attribute with the specified name

createElement

public Object createElement(String tagName)
Create a new HTML element with the given tag name.

Parameters:
tagName - the tag name
Returns:
the new HTML element, or NOT_FOUND if the tag is not supported

getDocument

protected HTMLDocument getDocument()
Returns HTML document.

Returns:
HTML document

createComment

public Object createComment(String comment)
Creates a new Comment.

Parameters:
comment - the comment text
Returns:
the new Comment

createDocumentFragment

public Object createDocumentFragment()
Creates a new document fragment.

Returns:
a newly created document fragment

createTextNode

public Object createTextNode(String newData)
Create a new DOM text node with the given data.

Parameters:
newData - the string value for the text node
Returns:
the new text node or NOT_FOUND if there is an error


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