polyfills
polyfills copied to clipboard
Pre tag misrendering inside template tag
Description
when we try to render a <pre> which is direct children of <p> tag , the browser rendering <pre> tag as sibling of <p> tag which is expected behaviour in chrome and I.E browsers.
But when we wrap the <pre> tag inside a <template> tag and tried to render it .
now <pre> tag renders inside <template> tag in chrome but it renders outside in I.E browser.
Steps to reproduce
var div = document.createElement("div"); div.setAttribute("id","pre-issue"); div.innerHTML = "<p><template><pre>this is pre tag</pre></template></p>"; document.body.appendChild(div); console.log(document.getElementById("pre-issue").innerHTML);
the output differs as follows
In chrome:
<p><template><pre>this is pre tag</pre></template></p>
In IE:
<p><template></template><pre>this is pre tag</pre><p></p>
Browsers affected
- [x] IE 11
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.