Talk:Generate Click Events: Difference between revisions
From GreaseSpot Wiki
Jump to navigationJump to search
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
at the end: | at the end: | ||
> Assume that the el variable points to some element which we want to "click on": | <blockquote> | ||
Assume that the el variable points to some element which we want to "click on": | |||
<pre> | |||
var evt = document.createEvent("HTMLEvents"); | |||
evt.initEvent("click", true, true); | |||
link.dispatchEvent(evt); | |||
</pre> | |||
</blockquote> | |||
there is no "el variable", is "link" the right reference??? | |||
I don't want to change anything unless I'm sure that I'm right. | |||
:Good catch. Fixed. [[User:Arantius|Arantius]] 16:30, 1 June 2010 (UTC) | |||
---- | |||
Revision as of 16:30, 1 June 2010
at the end:
Assume that the el variable points to some element which we want to "click on":
var evt = document.createEvent("HTMLEvents"); evt.initEvent("click", true, true); link.dispatchEvent(evt);
there is no "el variable", is "link" the right reference??? I don't want to change anything unless I'm sure that I'm right.
- Good catch. Fixed. Arantius 16:30, 1 June 2010 (UTC)