com.gargoylesoftware.htmlunit.javascript.host
Class CharacterDataImpl

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.CharacterDataImpl
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
Direct Known Subclasses:
Comment, Text

public class CharacterDataImpl
extends Node

A JavaScript object for CharacterData.

Version:
$Revision: 5301 $
Author:
David K. Taylor, Chris Erskine
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 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
CharacterDataImpl()
          Creates an instance.
 
Method Summary
 void jsxFunction_appendData(String arg)
          Append a string to character data.
 void jsxFunction_deleteData(int offset, int count)
          Delete characters from character data.
 void jsxFunction_insertData(int offset, String arg)
          Insert a string into character data.
 void jsxFunction_replaceData(int offset, int count, String arg)
          Replace characters of character data with a string.
 String jsxFunction_substringData(int offset, int count)
          Extract a substring from character data.
 Object jsxGet_data()
          Gets the JavaScript property "data" for this character data.
 int jsxGet_length()
          Gets the number of character in the character data.
 void jsxSet_data(String newValue)
          Sets the JavaScript property "data" for this character data.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Node
executeEvent, fireEvent, getEventHandler, getEventHandlerProp, getJavaScriptNode, getParent, hasEventHandlers, jsxFunction_addEventListener, jsxFunction_appendChild, jsxFunction_attachEvent, jsxFunction_cloneNode, jsxFunction_compareDocumentPosition, jsxFunction_detachEvent, jsxFunction_hasChildNodes, jsxFunction_insertBefore, jsxFunction_insertBefore, jsxFunction_isSameNode, jsxFunction_normalize, jsxFunction_removeChild, jsxFunction_removeEventListener, jsxFunction_replaceChild, jsxGet_childNodes, jsxGet_firstChild, jsxGet_lastChild, jsxGet_localName, jsxGet_namespaceURI, jsxGet_nextSibling, jsxGet_nodeName, jsxGet_nodeType, jsxGet_nodeValue, jsxGet_ownerDocument, jsxGet_parentNode, jsxGet_prefix, jsxGet_previousSibling, jsxGet_textContent, jsxGet_xml, jsxSet_nodeValue, jsxSet_textContent, setDomNode, setEventHandler, setEventHandlerProp
 
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

CharacterDataImpl

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

Method Detail

jsxGet_data

public Object jsxGet_data()
Gets the JavaScript property "data" for this character data.

Returns:
the String of data

jsxSet_data

public void jsxSet_data(String newValue)
Sets the JavaScript property "data" for this character data.

Parameters:
newValue - the new String of data

jsxGet_length

public int jsxGet_length()
Gets the number of character in the character data.

Returns:
the number of characters

jsxFunction_appendData

public void jsxFunction_appendData(String arg)
Append a string to character data.

Parameters:
arg - the string to be appended to the character data

jsxFunction_deleteData

public void jsxFunction_deleteData(int offset,
                                   int count)
Delete characters from character data.

Parameters:
offset - the position of the first character to be deleted
count - the number of characters to be deleted

jsxFunction_insertData

public void jsxFunction_insertData(int offset,
                                   String arg)
Insert a string into character data.

Parameters:
offset - the position within the first character at which the string is to be inserted.
arg - the string to insert

jsxFunction_replaceData

public void jsxFunction_replaceData(int offset,
                                    int count,
                                    String arg)
Replace characters of character data with a string.

Parameters:
offset - the position within the first character at which the string is to be replaced.
count - the number of characters to be replaced
arg - the string that replaces the count characters beginning at the character at offset.

jsxFunction_substringData

public String jsxFunction_substringData(int offset,
                                        int count)
Extract a substring from character data.

Parameters:
offset - the position of the first character to be extracted
count - the number of characters to be extracted
Returns:
a string that consists of the count characters of the character data starting from the character at position offset


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