I have a local html file with javascript code.
I have to cover drag and drop with tests.
It uses only IE.
In the javascript code, the "drop" event occurs and the contents of dataTransfer (e.dataTransfer.getData ("Text")).
In the test, I simulate an event with the following code:
event = document.createEventObject();
Here an event is created that contains dataTransfer == null.
Writing is not possible because the property is read only.
target.fireEvent("ondrop", event);
The event is fired in javascript code, but dataTransfer is null.
I have to put some test item in dataTransfer.
How can I solve this problem?
source
share