Created attachment 464579 [details] Demonstrates the error thrown with a string passed and none without. I believe by spec toLocaleLowerCase / toLocaleUpperCase are required to throw a RangeError if you specify an invalid locale per section 9.2.1 CanicalizeLocaleList with the exception thrown in step 7.c.v (https://tc39.es/ecma402/#sec-canonicalizelocalelist) Firefox throws a RangeError for both of the following: ''.toLocaleLowerCase(''); ''.toLocaleUpperCase(''); Chrome throws a RangeError for ''.toLocaleUpperCase('') and before M109 did for ''.toLocaleLowerCase(''), the lack of error for lowercase is tracked as https://crbug.com/1409058 Safari does not throw an error if the string being converted is empty, but does if you have a non-empty string being converted.
<rdar://problem/104568214>
Pull request: https://github.com/WebKit/WebKit/pull/8986
Committed 259242@main (e99f5f69bf90): <https://commits.webkit.org/259242@main> Reviewed commits have been landed. Closing PR #8986 and removing active labels.