Folks, I've been all over the net without finding a definitive answer,
so I thought I'd come to the source.  Is there any way, in
Safari/webkit, to programmatically select some text in javascript?
_______________________________________________
webkit-dev mailing list
[email protected]
http://www.opendarwin.org/mailman/listinfo/webkit-dev


Yes, of course. You should use the "document.execCommand(few args)" command. I successfully tested the 'SelectAll", "Copy", "Unselect" arguments in my dashboard widget. It works with text range too.

More info on Msdn pages:
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/ execcommand.asp


_______________________________________________
webkit-dev mailing list
[email protected]
http://www.opendarwin.org/mailman/listinfo/webkit-dev

Reply via email to