-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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: allow innerHtml if no dynamic dependencies #3808
feat: allow innerHtml if no dynamic dependencies #3808
Conversation
abbfb04
to
464868b
Compare
Suggestion: wouldn't it make more sense to use Edit: I'm actually don't think that that is applicable here, sorry! |
Damn, this is nice! Took me a minute to work out why the lifecycle order is subtly different in that one case, but having understood it (at present, Found myself wishing that our hydration was smart enough that we could skip subtrees, making it possible to use |
I havent really understood how svelte hydration works yet, but I guess I would have more bigger changes, that's why I left it as it is 🙈 |
Does the change from using |
Yeah this is definitely bad. <div>{'<div onclick="alert("oh no")">click me</div>'}</div> |
My bad for the security regression, i've made a PR to fix it: |
if the mustache tag expression do not change, can use
innerHtml
.For a this hello world example, saved 361 bytes without minified:
Before submitting the PR, please make sure you do the following
npm run lint
!)Tests
npm test
oryarn test
)