Summary: | Web Inspector: Rename String.prototype.trimEnd to avoid conflicts with native trimEnd | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> | ||||
Component: | Web Inspector | Assignee: | Nikita Vasilyev <nvasilyev> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bburg, commit-queue, inspector-bugzilla-changes, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Nikita Vasilyev
2018-02-06 11:53:06 PST
(In reply to Nikita Vasilyev from comment #0) > trimEnd just landed in JSC (bug 182233). Just like `trim` removes whitespace > at the beginning and the end of a string, > trimEnd removes whitespace only at the end. > > In Utilities.js we have: > > String.prototype.trimEnd(maxLength) > String.prototype.trimMiddle(maxLength) > String.prototype.truncate(maxLength) > > Our trimEnd truncates a string to a specified maxLength. > > I suggest to rename: > 1. trimEnd to truncateEnd > 2. trimMiddle to truncateMiddle Sounds okay to me. Created attachment 333235 [details]
Patch
Comment on attachment 333235 [details]
Patch
r=me with EWS
Comment on attachment 333235 [details] Patch Clearing flags on attachment: 333235 Committed r228214: <https://trac.webkit.org/changeset/228214> All reviewed patches have been landed. Closing bug. |