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

fix: "foreign" namespace elements should still allow binding 'this' #5942

Conversation

mrsauravsahu
Copy link
Contributor

@mrsauravsahu mrsauravsahu commented Jan 29, 2021

This fix allows using bind:this for foreign namespace elements. Here's the link to the issue: #5387 (comment)
The PR #5652 introduces this bug.

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with npm test and lint the project with npm run lint

@mrsauravsahu
Copy link
Contributor Author

Expecting the CI to fail for the negative test case.

@benmccann benmccann requested a review from halfnelson January 29, 2021 17:27
Copy link

@shirakaba shirakaba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane to me, though I'm not familiar with the bigger picture of validating properties and Svelte internals, so would be interested in @halfnelson's point of view.

@Conduitry Conduitry merged commit 87417e5 into sveltejs:master Jan 29, 2021
@Conduitry
Copy link
Member

Thank you! Your fix is included in 3.32.1.

hontas added a commit to hontas/svelte that referenced this pull request Feb 11, 2021
* 'master' of https://github.com/sveltejs/svelte: (129 commits)
  -> v3.32.3
  fix remove of lone :host selectors (sveltejs#5984)
  -> v3.32.2
  update changelog
  fix extra invalidation with component prop binding to object property (sveltejs#5890)
  update css-tree@^1.1.2 (sveltejs#5958)
  fix :host and :global css scoping (sveltejs#5957)
  Tutorial : a better explanation of component events (sveltejs#4639)
  "What's new in Svelte" February newsletter (sveltejs#5925)
  Change color on 404 page (sveltejs#5932)
  -> v3.32.1
  warn module variables are nonreactive and make them truly nonreactive (sveltejs#5847)
  update changelog
  fix: "foreign" namespace elements should still allow binding 'this' (sveltejs#5942)
  inline `prop_values` in `init` helper (sveltejs#5909)
  update changelog
  don't create class update functions when dependencies aren't reactive (sveltejs#5926)
  fix extraneous store subscription in SSR (sveltejs#5929)
  make `SvelteComponentDev` typings more forgiving (sveltejs#5937)
  make animation/transition params optional (sveltejs#5936)
  ...
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.

3 participants