Re: [selection-api] unsigned long is never negative (#33)

I don't think that would be disallowed by any spec, but I see that V8 has a limit on string lengths, `static const int kMaxLength = (1 << 28) - 16`.

You can get a Text node with a greater length with that:
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3594

However, I can't get a Text node with length 2^31 by increasing the number of copies before normalize, it crashes.

As for child nodes, testing that would take way too much memory.

I guess it's reasonable for the specs to pretend that 2^32 is the limit, and there can be lower limits that we call "platform limitations".

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/selection-api/issues/33#issuecomment-131012726

Received on Friday, 14 August 2015 08:10:40 UTC