You would use this method to put data into the clipboard. This is done by accessing the clipboardData or dataTransfer objects during an event handler. You can only store textual values into the clipboard with this method. However they may be the raw text data itself or a description of the URL where non-text data can be found.
The method takes two arguments. The first can be set to the value "TEXT" or "URL" to indicate which kind of data is being stored. The second argument is the data to be added to the transfer object.
This method returns a Boolean value indicating success or failure of the setData() call.