dillon1000/react

Commit

Stop using comments as boundary markers in dangerouslyRenderMarkup.

Jordan warned (and StackOverflow confirmed) that IE8 doesn't respect HTML
comment nodes when setting `.innerHTML`:
http://stackoverflow.com/questions/15006001/inserting-a-comment-in-innerhtml

The virtue of the comment strategy was that the parser did all the work of
maintaining the boundaries between markup chunks, using comments as the
boundary markers.  The new strategy (of tagging the first node with a
special attribute) has a similar virtue, since the parser should preserve
that attribute only for the nodes we care about, and any rendered nodes
that do not have the attribute can be ignored (and complained about by
`console.error`).
Browse files
Changed paths2 files
First-parent comparison
M src/dom/Danger.js ModifiedM src/dom/__tests__/Danger-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…