-
Notifications
You must be signed in to change notification settings - Fork 393
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
perf: Apply static parts optimization to dynamic style #4084
Conversation
…ntent-optimization-style
); | ||
if (data.style && !isString(data.style)) { | ||
logError( | ||
`Invalid 'style' attribute passed to <${sel}> is ignored. This attribute must be a string value.`, | ||
vmBeingRendered | ||
); | ||
} | ||
|
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.
I ended up moving this check into the patchStyleAttribute
routine instead because there isn't a straight-forward way to retrieve the tag name inside the st
function.
I've added a test to ensure it provides the same results.
packages/@lwc/engine-core/src/framework/modules/computed-style-attr.ts
Outdated
Show resolved
Hide resolved
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.
LGTM!
packages/@lwc/integration-karma/test/template/attribute-style/invalid/index.spec.js
Outdated
Show resolved
Hide resolved
…-attr.ts Co-authored-by: Will Harney <62956339+wjhsf@users.noreply.github.com>
Details
This PR expands the static content optimization to include dynamic styles as part of #3624.
The PR is broken into parts to more easily review:
Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?
GUS work item
Select Row Checkbox
W-14560941