Obsolete since Gecko 26 (Firefox 26 / Thunderbird 26 / SeaMonkey 2.23 / Firefox OS 1.2)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
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
Node.cloneNode(), although user data is not copied over, the handler will be called.
handle (operation, key, data, src, dst) (no return value)
This method is a callback which will be called if a node is being cloned, imported, renamed and as well, if deleted or adopted.
operation(unsigned short) is an operation type integer (see below).
DOMString) is the user key.
DOMUserData) is the user data.
Node) is the source node (
nullif being deleted).
Node) is the destination node (if any, or
NODE_RENAMED is currently not supported since
Node.renameNode() is not supported.)