Fix duplicate head and body from insertAdjacentHTML
This patch makes document.body.insertAdjacentHTML('afterend', '<p>') insert the <p> as a sibling of document.body rather than creating a duplicate body and putting <p> in the duplicate. This fix was made in webkit in 2016: https://github.com/WebKit/webkit/commit/e3ca66a98a2a5edd553c411d6249a3a6a176174a fast/dom/insertAdjacentHTML-DocumentFragment-crash no longer produces a console message because using insertAdjacentHTML to create a child of a DocumentFragment now works, just as it does in safari and firefox. Bug: 978148 Change-Id: I22248b914753a450e54f0a72066f5b0dcf584cb2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1824030Reviewed-by:Chris Harrelson <chrishtr@chromium.org> Reviewed-by:
Mason Freed <masonfreed@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/master@{#700842}
Showing
Please register or sign in to comment