Search code examples
javascriptbookmarkletgetselection

Are there any limits to the amount of text one can 'grab' with window.getSelection or document.selection.createRange()?


I can't seem to find this info anywhere?

Do window.getSelection() or document.selection.createRange() hold a set # of characters or can they hold an infinite/huge #?

I am working on a bookmarklet and want to know if I need to restrict the amount of text one copies.


Solution

  • There's no limit other than the normal practical limits in the size of a web page.