-
Notifications
You must be signed in to change notification settings - Fork 47k
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
React.renderToStaticMarkup should not add <noscript> tags #4550
Comments
We render |
A little bit more clarification since I didn't initially notice this was specifically for |
Ok I understand. Thank you for the quick reply. In fact, I have a webpage generator on the backend side which does not use the same CSS than the frontend side (which displays the rendered HTML stored in a DB). But I worked around by adding a different Thanks again. |
@zpao Could we use a comment node instead of noscript? |
IIRC there are issues with that though I don't know off the top of my head. Perhaps @chenglou does? |
Eh, I think comment would accidentally disappear in older browsers? @syranide knew |
If that behavior doesn't exist in IE9, it might serve as a useful alternative. |
We still support IE8, but yeah. |
I don't recall us considering comment nodes (which sounds like a good idea!), though I would also believe @syranide if he says we did. |
@chenglou IIRC the IE8 whitespace bug affects comments too (making them disappear), but that should not be an issue for us. Again IIRC, IE8-9 also has a bug where adjacent comments are merged into a single comment node (not sure under which conditions). All of these affect(ed) knockoutjs so perhaps there's more info to be found there. Other than that... comments (like text nodes) don't appear in @spicyj I think it was mentioned but never discussed, you had a PR for using comments instead of spans for text nodes though. |
@syranide I'm having trouble finding any information about a comment coalescence bug in IE 8/9. I did find a DOM method called |
@yaycmyk This is a long time ago, memory is really fuzzy, but I remember knockoutjs being affected by some comment quirks. |
knockout/knockout@6648861 is the closest I can find. |
I think the placeholders should not be inserted when rendering with renderToStaticMarkup:
For example, in a more complex structure, it becomes hard to use CSS selectors like
:first-child
,:nth-child()
etc.The text was updated successfully, but these errors were encountered: