[webkit-help] simulating end key in mac
ap at webkit.org
Fri Mar 14 09:39:30 PDT 2014
14 марта 2014 г., в 6:07, Deepak Mittal <deepak.deepakmittal at gmail.com> написал(а):
> I wanted to simulate 'end' key behavior for one of my test case..
> I know selecting
> function key + rightArrow key will do same behavior as 'end' key in mac..
> But I wanted to know how to do that in the java script..so that my test case get passed in the mac..
I think that you are looking for either window.getSelection().modify("move", "forward", "line") or testRunner.execCommand("MoveToEndOfLine").
Selection.modify() is a WebKit extension that works in any WebKit based application, and the testRunner method obviously only works in DumpRenderTree/WebKitTestRunner.
- WBR, Alexey Proskuryakov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-help