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
[labs/ssr] Add localName to DOM emulation for SSR #3375
Comments
Hi, I would love to try and help if this is open to external contributors. @justinfagnani, is this just a matter of adding the |
@willmartian sorry for the delayed response. We're definitely open to external contributors (and would love to erase even the external distinction over time). That's one reason I tagged this as a "Good First Issue". I think what's needed is to implement a |
after making the required changes how can i test it? |
…lements.define call This change extends the CustomElementRegistryShim to patch localName and tagName into the web component, when calling define. This allows instances to call `this.localName` and `this.tagName` accordingly. Fixes lit#3375
Should this be an RFC?
Which package is this a feature request for?
SSR (@lit-labs/ssr)
Description
When running the SSR script the element's
localName
andtagName
are not added to the element. This has lead to a bug in theElementInternals
polyfill at this line.This line exists to make sure that the node being referenced by the internals object is a custom element. This might be useful server-side behavior so that elements using
AriaMixin
via theElementInternals
spec can sprout attributes on their hosts (yet to be tested).Alternatives and Workarounds
A current workaround for the polyfill has already been implemented, returning an empty object for the internals instance in case no localName is present.
The text was updated successfully, but these errors were encountered: