forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibJS: Implement String.prototype.substr according to the spec
Fixes SerenityOS#6325 The JavaScript on the HTML Spec site that caused the crash is: window.location.hash.substr(1) Of course, window.location.hash can be the empty string. The spec allows for calling substr(1) on an empty string, but our partial implementation wasn't handling it properly.
- Loading branch information
1 parent
bc9cd55
commit b6093ae
Showing
2 changed files
with
20 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Userland/Libraries/LibJS/Tests/builtins/String/String.prototype.substr.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters