Bug 303832

Summary: Web Inspector: Replace deprecated String.prototype.substr with substring and at for single parameters
Product: WebKit Reporter: Brandon <brandonstewart>
Component: Web InspectorAssignee: 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
Reported 2025-12-09 06:06:47 PST
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
Radar WebKit Bug Importer
Comment 1 2025-12-09 06:06:55 PST
Brandon
Comment 2 2025-12-09 06:08:18 PST
EWS
Comment 3 2025-12-09 14:47:24 PST
Committed 304181@main (e2e6e3b758f6): <https://commits.webkit.org/304181@main> Reviewed commits have been landed. Closing PR #55106 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.