Skip to content

refactor(core): replace deprecated substr in jsaction parsing - #71144

Closed
MeAkib wants to merge 1 commit into
angular:mainfrom
MeAkib:refactor/deprecated-substr
Closed

MeAkib wants to merge 1 commit into
angular:mainfrom
MeAkib:refactor/deprecated-substr

Conversation

@MeAkib

@MeAkib MeAkib commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

`ActionResolver` split `jsaction` values with `String.prototype.substr`,
which is deprecated (Annex B). The indexes come from `indexOf` and are
never negative, so `slice` returns the same result.

Tested with `//packages/core/primitives/event-dispatch/test:browser_test`
(Chromium), which covers `jsaction` values with and without an event type.
@pullapprove
pullapprove Bot requested a review from e-cline October 2, 2026 17:39
@angular-robot angular-robot Bot added area: core Issues related to the framework runtime requires: TGP This PR requires a passing TGP before merging is allowed labels Oct 2, 2026
@ngbot ngbot Bot added this to the Backlog milestone Oct 2, 2026

@JeanMeche JeanMeche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're not one-to-one replaceable. slice(start, end) vs substr(start, length).

Given that there is little value to change something that works here. I'll decline the change.

@JeanMeche JeanMeche closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Issues related to the framework runtime requires: TGP This PR requires a passing TGP before merging is allowed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants