Programmer's Guide > Interfaces > W3C Node interface > setUserData method
  
setUserData method
Associate an object to a key on this node. The object can later be retrieved from this node by calling getUserData with the same key.
setUserData(key, data, handler)
Parameters
Stringkey
The key to associate the object to.
DOMUserDatadata
The object to associate to the given key, or null to remove any existing association to that key.
UserDataHandlerhandler
The handler to associate to that key, or null.
Returns
DOMUserData. Returns the DOMUserData previously associated to the given key on this node, or null if there was none.