1

I have problem, I Tried Alot of things. Look here:

that is my Div element that i try to perform double click

enter image description here

Ok what did i tried.

  1. Try this tutorial that code looks like that That (right now i dont try send any id i just do const in function but the error no there so right now less care)

Error: "'document' is undefined

  1. I already asked in the forum how to perform dblclick in javascript it worked.... in The console, but not in the PowerShell, in Powershell:

in that example: Event no exist so i cant even try that

var evt = new Event('dblclick');

var button = document.getElementById('myButton');

// This is where the magic happens
button.dispatchEvent(evt);

in that example:

There no MouseEvent so same cant even try that one.

in that example:

It more complicate, the $ie.docuemnt not contains the createEvent function. And the Firevent not working.

Here the code i try

Please help.

var event; // The custom event that will be created

if (document.createEvent) {
  event = document.createEvent("HTMLEvents");
  event.initEvent("dataavailable", true, true);   
} else {
  event = document.createEventObject();
  event.eventType = "dataavailable";   
}


event.eventName = "dataavailable";

if (document.createEvent) {
  element.dispatchEvent(event);   
} else {
  element.fireEvent("on" + event.eventType, event);   
}

Any more idiea to try, every thing is good :)

Community
  • 1
  • 1
Asaf Shazar
  • 1,065
  • 1
  • 11
  • 33

0 Answers0