public class CharacterData extends Node
CharacterData.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| Constructor and Description |
|---|
CharacterData()
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
after(net.sourceforge.htmlunit.corejs.javascript.Context context,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args,
net.sourceforge.htmlunit.corejs.javascript.Function function)
Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent,
just after this ChildNode.
|
void |
appendData(String arg)
Append a string to character data.
|
static void |
before(net.sourceforge.htmlunit.corejs.javascript.Context context,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args,
net.sourceforge.htmlunit.corejs.javascript.Function function)
Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent,
just before this ChildNode.
|
void |
deleteData(int offset,
int count)
Delete characters from character data.
|
Object |
getData()
Gets the JavaScript property
data for this character data. |
int |
getLength()
Gets the number of character in the character data.
|
Element |
getNextElementSibling()
Returns the next element sibling.
|
Element |
getPreviousElementSibling()
Returns the previous element sibling.
|
void |
insertData(int offset,
String arg)
Insert a string into character data.
|
void |
remove()
Removes the DOM node from its parent.
|
void |
replaceData(int offset,
int count,
String arg)
Replace characters of character data with a string.
|
static void |
replaceWith(net.sourceforge.htmlunit.corejs.javascript.Context context,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args,
net.sourceforge.htmlunit.corejs.javascript.Function function)
Replaces the node wit a set of Node or DOMString objects.
|
void |
setData(String newValue)
Sets the JavaScript property
data for this character data. |
String |
substringData(int offset,
int count)
Extract a substring from character data.
|
appendChild, asJavaScriptException, cloneNode, compareDocumentPosition, contains, getAttributes, getBaseURI, getChildElementCount, getChildNodes, getChildren, getFirstChild, getFirstElementChild, getJavaScriptNode, getLastChild, getLastElementChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, getTextContent, hasAttributes, hasChildNodes, insertBefore, insertBeforeImpl, isSameNode, normalize, removeChild, replaceChild, setNodeValue, setTextContentaddEventListener, clearEventListenersContainer, dispatchEvent, executeEventLocally, fireEvent, getEventHandler, getEventListenersContainer, hasEventHandlers, isEventHandlerOnWindow, removeEventListener, setEventHandlerclone, equivalentValues, get, getBrowserVersion, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElementdefineFunctionProperties, defineProperty, getClassName, put, setClassName, setParentScopeapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isReadOnlySettable, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setPrototype, sizepublic Object getData()
data for this character data.public void setData(String newValue)
data for this character data.newValue - the new String of datapublic int getLength()
public void appendData(String arg)
arg - the string to be appended to the character datapublic void deleteData(int offset,
int count)
offset - the position of the first character to be deletedcount - the number of characters to be deletedpublic void insertData(int offset,
String arg)
offset - the position within the first character at which
the string is to be inserted.arg - the string to insertpublic void replaceData(int offset,
int count,
String arg)
offset - the position within the first character at which
the string is to be replaced.count - the number of characters to be replacedarg - the string that replaces the count characters beginning at
the character at offset.public String substringData(int offset, int count)
offset - the position of the first character to be extractedcount - the number of characters to be extractedpublic Element getNextElementSibling()
public Element getPreviousElementSibling()
public void remove()
remove in class Nodepublic static void before(net.sourceforge.htmlunit.corejs.javascript.Context context,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args,
net.sourceforge.htmlunit.corejs.javascript.Function function)
context - the contextthisObj - this objectargs - the argumentsfunction - the functionpublic static void after(net.sourceforge.htmlunit.corejs.javascript.Context context,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args,
net.sourceforge.htmlunit.corejs.javascript.Function function)
context - the contextthisObj - this objectargs - the argumentsfunction - the functionpublic static void replaceWith(net.sourceforge.htmlunit.corejs.javascript.Context context,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args,
net.sourceforge.htmlunit.corejs.javascript.Function function)
context - the contextthisObj - this objectargs - the argumentsfunction - the functionCopyright © 2002–2020 Gargoyle Software Inc.. All rights reserved.