[Webkit-unassigned] [Bug 244196] String.prototype.includes should return true when the first parameter is empty regardless of whether the second parameter is greater than length.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 22 09:03:59 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=244196

Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.webkit.org/sho
                   |                            |w_bug.cgi?id=144314

--- Comment #2 from Darin Adler <darin at apple.com> ---
The suggested change sounds OK. There are other ways to fix it as well. Makes sense that JavaScript calls for this behavior, since it's consistent with indexOf.

I am surprised this is not covered by Test262. Maybe this function is too new?

It looks like the startsWith and endsWith implementations may have a similar bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220822/f88b2afc/attachment.htm>


More information about the webkit-unassigned mailing list