event.data

JavaScript 1.2+ Nav4+ Syntax

							event.data

Description

The data property of the Event object references an array of strings for events of objects that have been dragged and dropped. Each string in the array contains a URL representing the dropped object. The data property can be read only if the script has the UniversalBrowserRead privilege.

Example

Listing 7.203 shows an example of how the data property can be used to determine the URL of objects that have been dragged and dropped. The example captures all DRAGDROP events and passes them to a function called handleDrapDrop(). The function extracts the data property from the event and outputs it.

Listing 7.203 Accessing the event.data Property
 <html> <head> <title>Example of ...

Get Pure JavaScript 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.