[Webkit-unassigned] [Bug 34821] should add Range.modify to match Selection.modify
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 6 09:31:18 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=34821
--- Comment #5 from Ryosuke Niwa <rniwa at webkit.org> 2010-12-06 09:31:17 PST ---
I'm not sure if adding modify to Range is the right way to provide the said functionality. Exposing a new method on document / frame to create selection or make a clone of the selection might be a better idea because that'll allow developers to call any method provided by selection, and we don't need to add any exotic methods to Range.
Usage 1:
var selection = window.getSelection().copy();
selection.modify(...);
...
window.setSelection(selection);
Usage 2:
var selection = window.createSelection();
selection.setBaseAndExtend(...);
...
if (window.getSelection() == selection)
doSomething();
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list