Skip to content
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

Mutating <noscript> content on IE8 throws #1905

Closed
syranide opened this issue Jul 21, 2014 · 1 comment
Closed

Mutating <noscript> content on IE8 throws #1905

syranide opened this issue Jul 21, 2014 · 1 comment

Comments

@syranide
Copy link
Contributor

React.renderComponent(React.DOM.noscript(null, 1), document.body);
React.renderComponent(React.DOM.noscript(null, 2), document.body);

Execute that and it goes boom, IE8 throws away all children of noscript after render and violently screams if you in any way try to add children afterwards.

Should you be mutating noscript? No, you shouldn't, but I imagine that reality is not quite as simple, where it could look something like:

<noscript>There are {count} items</noscript>

and there you have an error if count ever changes.

Practically though, noscript content is useless client-side and I see no reason why we shouldn't just discard any children passed to it client-side (for performance gains). If there are children left there from server-rendering, they will stay as-is until the noscript is removed from the DOM at a later time.

This could easily be done by adding a simple ReactDOMNoScript component that just returns noscript(this.props, null) if it's not for server-rendering. I could whip up a PR if you guys think it's a good idea? @zpao?

@syranide
Copy link
Contributor Author

Since there's been no movement on this and we no longer explicitly care about IE8 this seems dead in the water.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant