简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM