You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we pretend that all CharacterData nodes (Text, CDATASection, ProcessingInstruction, and Comment) can have infinite length. In practice however it seems the upper limit has to be JavaScript's String's maximum length, which is 253 − 1.
Should we standardize on that and attempt to deal with the consequences for wholeText, normalize(), etc?
Feels a bit overkill. I'd assume the platform has plenty of places where string length may get too large.
documentElement.textContent for example. Even though that is not modifying the DOM itself, what should happen on the caller side if there is OOM or otherwise too large string? (I think Gecko will throw some out-of-memory exception in that case)
I think Infra's carveout is less applicable here as String has a well-defined length. And CharacterData cannot exceed that length. So here we can in fact define reasonable behavior in all the edge cases (such as throwing or not normalizing).
Currently we pretend that all
CharacterData
nodes (Text
,CDATASection
,ProcessingInstruction
, andComment
) can have infinite length. In practice however it seems the upper limit has to be JavaScript'sString
's maximum length, which is 253 − 1.Should we standardize on that and attempt to deal with the consequences for
wholeText
,normalize()
, etc?cc @rniwa @smaug---- @mfreed7
The text was updated successfully, but these errors were encountered: