-
Notifications
You must be signed in to change notification settings - Fork 27k
fix(core): catch hydration marker with implicit body tag #60429
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
Conversation
08b9dd4 to
5b23cf6
Compare
|
Adding some tests because there's a few more edge cases I should handle here. |
|
Alright, this should be ready for some eyes. Now handles both the optional |
When the browser parses a valid html5 response like this: ```html <!-- ... --> <title>My page</title> </head> <!--nghm--> <app-root></app-root> <!-- ... --> ``` The resulting DOM will only start adding nodes to the body when it runs into the first non-header tag. E.g.: ```yml - head - title "My page" - comment "nghm" - body - app-root ``` This isn't a sign that comments are modified, so it seems worth to handle it gracefully.
|
This PR was merged into the repository by commit b461e06. The changes were merged into the following branches: main, 19.2.x |
When the browser parses a valid html5 response like this: ```html <!-- ... --> <title>My page</title> </head> <!--nghm--> <app-root></app-root> <!-- ... --> ``` The resulting DOM will only start adding nodes to the body when it runs into the first non-header tag. E.g.: ```yml - head - title "My page" - comment "nghm" - body - app-root ``` This isn't a sign that comments are modified, so it seems worth to handle it gracefully. PR Close #60429
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
When the browser parses a valid html5 response like this:
The resulting DOM will only start adding nodes to the body when it runs into the first non-header tag. E.g.:
This isn't a sign that comments are modified, so it seems worth to handle it gracefully.
Motivation here is to allow some more minification of the HTML response and easier integration with systems that compose response fragments from different sources.