Skip to content
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

disableSyntheticShadowSupport/lightDOM should remove genScopedId compilation #3658

Closed
Tracked by #3228
nolanlawson opened this issue Aug 4, 2023 · 0 comments · Fixed by #4399
Closed
Tracked by #3228

disableSyntheticShadowSupport/lightDOM should remove genScopedId compilation #3658

nolanlawson opened this issue Aug 4, 2023 · 0 comments · Fixed by #4399
Labels
Up for grabs Issues that are relatively small, self-contained, and ready for implementation

Comments

@nolanlawson
Copy link
Collaborator

For light DOM components, as well as shadow DOM components when the disableSyntheticShadowSupport option is enabled, we should not emit genScopedId. I.e. this:

<template>
    <div id="foo"></div>
</template>
function tmpl($api, $cmp, $slotset, $ctx) {
    const {gid: api_scoped_id, h: api_element} = $api;
    return [api_element("div", {
        attrs: {
            "id": api_scoped_id("foo") // <-- this
        },
        key: 0
    })];
}

This is actually a slight perf degradation, because it may cause a VNode to be considered dynamic when it could be static-optimized.

@nolanlawson nolanlawson added the Up for grabs Issues that are relatively small, self-contained, and ready for implementation label Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Up for grabs Issues that are relatively small, self-contained, and ready for implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant