[webkit-help] simulating end key in mac

Alexey Proskuryakov 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...
URL: <https://lists.webkit.org/pipermail/webkit-help/attachments/20140314/b3a59fb6/attachment.html>

More information about the webkit-help mailing list