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

feat: add ability to extend custom element class #8991

Merged
merged 3 commits into from
Jul 18, 2023
Merged

Commits on Jul 18, 2023

  1. feat: add ability to extend custom element class

    This should help everyone who has special needs and use cases around custom elements. Since Svelte components are wrapped and only run on connectedCallback, it makes sense to expose the custom element class for modification before that.
    - fixes #8954 - use extend to attach the function manually and save possible values to a prop
    - closes #8473 / closes #4168 - use extend to set the proper static attribute and then call attachInternals in the constructor
    closes #8472 - use extend to attach anything custom you need
    closes #3091 - pass `this` to a prop of your choice and use it inside your component
    dummdidumm committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    ef390b4 View commit details
    Browse the repository at this point in the history
  2. more detailed example

    dummdidumm committed Jul 18, 2023
    Configuration menu
    Copy the full SHA
    9aadaa5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0e21249 View commit details
    Browse the repository at this point in the history