Bug 303832
| Summary: | Web Inspector: Replace deprecated String.prototype.substr with substring and at for single parameters | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Brandon <brandonstewart> |
| Component: | Web Inspector | Assignee: | Brandon <brandonstewart> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | inspector-bugzilla-changes, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Brandon
String.prototype.substr is deprecated (Annex B) and should be replaced
with modern alternatives. Using slice rather than substring because
slice handles negative indices correctly, matching substr's behavior.
Only handling the single parameter case, because the two parameter function calls have different syntax:
String.prototype.substr ( start, length )
String.prototype.slice ( start, end )
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/166140736>
Brandon
Pull request: https://github.com/WebKit/WebKit/pull/55106
EWS
Committed 304181@main (e2e6e3b758f6): <https://commits.webkit.org/304181@main>
Reviewed commits have been landed. Closing PR #55106 and removing active labels.