* Creates a marker comment node and append it into the ` `. * Some CDNs have mechanisms to remove all comment node from HTML. * This behaviour breaks hydration, so we'll detect on the client side if this * marker comment is still available or else throw an error
(doc: Document)
| 131 | * marker comment is still available or else throw an error |
| 132 | */ |
| 133 | function appendSsrContentIntegrityMarker(doc: Document) { |
| 134 | // Adding a ng hydration marker comment |
| 135 | const comment = doc.createComment(SSR_CONTENT_INTEGRITY_MARKER); |
| 136 | doc.body.firstChild |
| 137 | ? doc.body.insertBefore(comment, doc.body.firstChild) |
| 138 | : doc.body.append(comment); |
| 139 | } |
| 140 | |
| 141 | /** |
| 142 | * Adds the `ng-server-context` attribute to host elements of all bootstrapped components |
no test coverage detected
searching dependent graphs…