Introduced in: | DOM 3 Core |
When associating user data with a key on a node, Node.setUserData()
can also accept, in its third argument, a handler which will be
called when the object is cloned, imported, deleted, renamed, or
adopted. Per the specification, exceptions should not be thrown in
a UserDataHandler. In both document.importNode() and Node.cloneNode(),
although user data is not copied over, the handler will be called.
public function handle(operation:Number, key:DOMString, data:Object, src:Node, dst:Node):void
Introduced in: | DOM 3 Core |
This method is called whenever the node for which this handler is
registered is imported or cloned.
Parameters
| operation:Number — Specifies the type of operation that is being performed on the node.
|
|
| key:DOMString — Specifies the key for which this handler is being called.
|
|
| data:Object — Specifies the data for which this handler is being called.
|
|
| src:Node — Specifies the node being cloned, adopted, imported, or renamed. This is null when the node is being deleted.
|
|
| dst:Node — Specifies the node newly created if any, or null.
|
See also
public static const NODE_ADOPTED:Number = 5
Introduced in: | DOM 3 Core |
The node is adopted, using Document.adoptNode().
public static const NODE_CLONED:Number = 1
Introduced in: | DOM 3 Core |
The node is cloned, using Node.cloneNode().
public static const NODE_DELETED:Number = 3
Introduced in: | DOM 3 Core |
The node is deleted.
public static const NODE_IMPORTED:Number = 2
Introduced in: | DOM 3 Core |
The node is imported, using Document.importNode().
public static const NODE_RENAMED:Number = 4
Introduced in: | DOM 3 Core |
The node is renamed, using Document.renameNode().
Mon Aug 17 2009, 10:08 AM -04:00