feat(core): Add a public API to establish events to be replayed and a…#55356
feat(core): Add a public API to establish events to be replayed and a…#55356iteriani wants to merge 1 commit intoangular:mainfrom
Conversation
There was a problem hiding this comment.
We can refactor (simplify) this code a bit to change the type from a string to a boolean:
| const type = | |
| (typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0) ? 'dom' : 'output'; | |
| if (type === 'dom') { | |
| const isDomEvent = typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0; | |
| if (isDomEvent) { |
There was a problem hiding this comment.
Is there a way to make JSON data structures not have XSS vulnerabilities?
There was a problem hiding this comment.
This is pretty confusing. If I'm reading it correctly, it sounds like you're doing something like this:
const isCaptureArg = typeof useCaptureOrIndx === 'boolean'
const isUnsubscribeMethod = usecaptureOrIndx >= 0;
if (isCaptureArg || isUnsubscribeMethod) {
...
}But also I don't really get why we only add the event to the contract in those two conditions?
There was a problem hiding this comment.
this is copy paste from the prototype. maybe @AndrewKushnir can help out here.
There was a problem hiding this comment.
OK actually I think I get it now. I'm guessing the unsubscribe method is like an observable for the event or something?
|
Caretaker note: this PR requires cl/625907131 to be submitted first. |
0510faa to
85dbc13
Compare
…n attribute to mark an element with an event handler. These will be consumed by the event-dispatch contract to replay events. The contract and the dispatcher inclusion will be in followups.
|
Caretaker note: presubmit is "green", this PR is ready for merge. |
|
This PR was merged into the repository by commit a730f09. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…n attribute to mark an element with an event handler.
These will be consumed by the event-dispatch contract to replay events. The contract and the dispatcher inclusion will be in followups.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information