-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 non-root <script> hydration #1087
Conversation
Do you have any good ideas about how we want to handle this? As I was poking around at this today, I was gradually realizing that it didn't seem there was a great solution. |
Oh, I was confused. I didn't realize you were planning on merging in all of my changes in #1086, I thought you just going to grab the |
Yeah, I figured it makes more sense than the status quo. Can't quite wrap my brain round what's going on with this test, though I feel like it's something obvious |
Took a look at this - I can't tell whether this is something you'd already realized, but it looks to me like the generated code for these non-top-level elements in hydratable components is wrong, not an issue with the test. There's code to attempt to claim the script/style tag, but then nothing to put in its content. I assume we'd want to do this with a In my PR #1086, I changed how these elements are parsed so that the script/style contents are stored in the |
Fixed hydration and got this test to pass! Looks like the failure now is just Travis. I followed a similar approach as in #1162, except that |
Codecov Report
@@ Coverage Diff @@
## master #1087 +/- ##
==========================================
+ Coverage 91.48% 91.96% +0.47%
==========================================
Files 126 126
Lines 4524 4630 +106
Branches 1461 1507 +46
==========================================
+ Hits 4139 4258 +119
+ Misses 163 160 -3
+ Partials 222 212 -10
Continue to review full report at Codecov.
|
👍 Everyone's happy now. #1162 should probably be merged before this, or it will have nothing to do. |
Still some problems with escaping |
This fails because hydration behaves differently with non-top-level
<script>
and<style>