Chrome Version: ToT
OS: All but iOS
What steps will reproduce the problem?
(1) Open the following document
<!DOCTYPE html>
<html>
<body>
<script>
class MyElement extends HTMLScriptElement {
constructor() { super(); }
connectedCallback() {
this.style.display = 'block';
this.style.whiteSpace = 'pre-wrap';
this.style.border = 'solid 1px blue';
}
}
customElements.define('my-script', MyElement, { extends: 'script' });
</script>
<script is="my-script">console.log('foo');</script>
</body>
</html>
What is the expected result?
"console.log('foo');" within a blue box is shown.
What happens instead?
Nothing is shown.
Please use labels and text to provide additional information.
Firefox works correctly.
We have a special handling for <script> creation. See HTMLConstructionSite::InsertScriptElement().
Comment 1 by tkent@chromium.org
, Feb 2 2018