Skip to content

Conversation

@oscarmarina
Copy link

This change adds the same inheritance safety measures already implemented in native-shim.ts

  • Ensures that instances of the patched HTMLElement have a .constructor reference pointing to the patched constructor itself.

  • Preserves the prototype chain by setting the patched constructor’s [[Prototype]] to the native HTMLElement.

Context
This issue was discovered in a very specific case involving legacy applications still using custom-elements-es5-adapter.js, the old @open-wc/scoped-elements for Lit 1, and the new @open-wc/scoped-elements for Lit 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant