Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 25. Client-Side JavaScript Refer... > CharacterData.insertData( ): insert ...

CharacterData.insertData( ): insert a string into a Text or Comment nodeDOM Level 1 Core:

Synopsis

void insertData(unsigned longoffset,
                String arg)
    throws DOMException;

Arguments


offset

The character position within the Text or Comment node at which the string is to be inserted.


arg

The string to insert.

Throws

This method may throw a DOMException with one of the following code values in the following circumstances:


INDEX_SIZE_ERR

offset is negative or greater than the length of the Text or Comment node.


NO_MODIFICATION_ALLOWED_ERR

The node is read-only and may not be modified.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial