Name

setUserData: key, data, handler(3)

Synopsis

The setUserData( ) method (in conjunction with the getUserData( ) method) provides a facility for attaching application-specific information to DOM nodes. By using distinct key values, it is possible to attach multiple user objects to a single DOM node. The information to be attached must conform to the DOMUserData type and may include a data handler object that implements the UserDataHandler interface.

Arguments

key: DOMString

The unique key to associate with the data parameter in the node’s list of user data.

data: DOMUserData

The user data to attach.

handler: UserDataHandler

An object that will receive notification when various operations are performed on the DOM node in question.

Java binding

public Object setUserData(String key, Object data, 
UserDataHandler handler);

Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.