Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

clearData method

Removes one or more data formats from the clipboard through the dataTransfer object or the clipboardData object.

Syntax


 retVal = object.clearData(format);

Parameters

format [in, optional]

Type: BSTR

A BSTR that specifies one or more of the following data format values.

Text

Removes the text format.

URL

Removes the URL format.

File

Removes the file format.

HTML

Removes the HTML format.

Image

Removes the image format.

Standards information

There are no standards that apply here.

Remarks

If no format parameter is passed, the data formats are cleared.

For drag-and-drop operations, the IHTMLDataTransfer::clearData method of the dataTransfer object is used generally in source events, such as HTMLFrameSiteEvents::ondragstart. When you override the default behavior of the target, use IHTMLDataTransfer::clearData in the HTMLFrameSiteEvents::ondrop event. It is particularly useful for selectively removing data formats when multiple formats are specified.

See also

Reference
IHTMLDataTransfer::getData
IHTMLDataTransfer::setData
Conceptual
About DHTML Data Transfer

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.