-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
@lwc/lwc/no-unsupported-ssr-properties and @lwc/lwc/no-restricted-browser-globals-during-ssr check all functions in a component for unsafe SSR practices. However, not all functions need to be SSR safe, only those called on first paint.
Example:
export default class ExampleButton {
handleFocus() {
this.dispatchEvent(new CustomEvent('focus')); //@lwc/lwc/no-unsupported-ssr-properties error
console.log(window.location.href) //@lwc/lwc/no-restricted-browser-globals-during-ssr error
}
}Relevant Slack Thread: https://salesforce-internal.slack.com/archives/C5W3E40TC/p1719415297404469
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
