-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(platform-server): minor cleanup in insertEventRecordScript
logic
#55790
refactor(platform-server): minor cleanup in insertEventRecordScript
logic
#55790
Conversation
1ad5994
to
4e98a22
Compare
… logic - Uses Set instead of a number of checks - Remove unneeded `Array.from`
4e98a22
to
232dc77
Compare
'pointerenter', | ||
'pointerleave', | ||
]); | ||
const ALLOWED_CAPTAURE_EVENT_TYPES = new Set<string>(['focus', 'blur', 'error', 'load', 'toggle']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const ALLOWED_CAPTAURE_EVENT_TYPES = new Set<string>(['focus', 'blur', 'error', 'load', 'toggle']); | |
const ALLOWED_CAPTURE_EVENT_TYPES = new Set<string>(['focus', 'blur', 'error', 'load', 'toggle']); |
if (DISALLOWED_EVENT_TYPES.has(eventType)) { | ||
continue; | ||
} | ||
if (ALLOWED_CAPTAURE_EVENT_TYPES.has(eventType)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (ALLOWED_CAPTAURE_EVENT_TYPES.has(eventType)) { | |
if (ALLOWED_CAPTURE_EVENT_TYPES.has(eventType)) { |
@@ -133,49 +133,56 @@ function appendServerContextInfo(applicationRef: ApplicationRef) { | |||
}); | |||
} | |||
|
|||
const DISALLOWED_EVENT_TYPES = new Set<string>([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like those consts would intersect with a similar ones from PR #55799.
if (captureEventTypes.length) { | ||
jsActionBootstrapParams.push(JSON.stringify(captureEventTypes)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
if (captureEventTypes.length) { | |
jsActionBootstrapParams.push(JSON.stringify(captureEventTypes)); | |
if (captureEventTypes.length > 0) { | |
jsActionBootstrapParams.push(JSON.stringify(captureEventTypes)); |
|
||
const replayScript = createScript(doc, replayScriptContents, nonce); | ||
// This is defined in packages/core/primitives/event-dispatch/contract_binary.ts | ||
const jsActionBootstrapParams = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Array.from