Adobe 38040334 API Reference - Page 265
dreamweaver.nodeToOffsets deprecated, dreamweaver.offsetsToNode deprecated
![]() |
UPC - 883919090467
View all Adobe 38040334 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 265 highlights
DREAMWEAVER CS3 260 API Reference • The node argument is the node that you want to check. Returns A Boolean value: true if the node exists; false otherwise. Example The following example gets the current node, locates a table within it, and later calls dw.nodeExists() to see if the original node still exists: function applyFormatToSelectedTable(){ // get current selection var selObj = dw.getDocumentDOM().getSelectedNode(); alternateRows(dwscripts.findDOMObject("presetNames").selectedIndex, findTable()); // restore original selection, if it still exists; if not, just select the // table. var selArr; if (dw.nodeExists(selObj)) selArr = dom.nodeToOffsets(selObj); else selArr = dom.nodeToOffsets(findTable()); dom.setSelection(selArr[0],selArr[1]); } dreamweaver.nodeToOffsets() (deprecated) Availability Dreamweaver 2; deprecated in 3 in favor of "dom.nodeToOffsets()" on page 256. Description Gets the position of a specific node in the DOM tree, which is expressed as byte offsets into the document's source code. Arguments node • The node argument must be a tag, comment, or range of text that is a node in the tree that the dreamweaver.getDocumentDOM() function returns. Returns An array that contains two integers. The first integer is the byte offset for the opening of the tag, text, or comment; the second integer is the byte offset for the closing of the node. dreamweaver.offsetsToNode() (deprecated) Availability Dreamweaver 2; deprecated in 3 in favor of "dom.offsetsToNode()" on page 257.
![](/manual_guide/products/adobe-38040334-api-reference-b593776/265.png)