documentEdited()

Description Called when the floater becomes visible and after the current series of edits is complete. (That is, multiple edits may occur before this function is called). This function should be defined only if the floater must track edits to the document.
Note: Only define documentEdited() only if you absolutely require it, because its existence impacts performance.
Arguments None.
Returns Nothing.
Example The following instance of documentEdited() scans the document for layers and updates a text field that displays the number of layers in the document:
function documentEdited(){
  /* create a list of all the layers in the document */
  var theDOM = dw.getDocumentDOM();
  var layersInDoc = theDOM.getElementsByTagName("layer");
  var layerCount = layersInDoc.length;

  /* update the numOfLayers field with the new layer count */
  document.theForm.numOfLayers.value = layerCount;
}