
294 Floating Panels
The selectionChanged() function first calls the dw.getDocumentDOM() function to get the
Document Object Model (DOM) for the user’s document. It then calls the
getSelectedNode() function to see if the selected node for that document is, first, an
element and, second, a
SCRIPT tag. If both these conditions are true, the
selectionChanged() function makes the scripteditor floating panel visible and loads it
with the underlying JavaScript code. It also sets the
visibility property of the blanklayer
floating panel to the value
hidden. The following figure shows the scriptlayer floating
panel with the selected JavaScript code:
Commentaires sur ces manuels