Status: Untriaged
Owner: ----
New issue 4204 by [email protected]: innerHTML of custom element within
createdCallback is cut-off at the first encountered script tag
https://code.google.com/p/v8/issues/detail?id=4204
Version: Chrome 43.0.2357.124 (64-bit)
OS: Mac OSX Yosemite
Architecture: <ARM, x64, etc.>
What steps will reproduce the problem?
For reference: https://github.com/skatejs/skatejs/issues/221. The steps are
in the above link, but for convenience, take the following HTML document:
<!doctype html>
<html>
<head>
<script>
document.registerElement('my-element', {
prototype: Object.create(window.HTMLElement.prototype, {
createdCallback: {
value: function () {
console.log(this.innerHTML);
}
}
})
});
</script>
</head>
<body>
<my-element>
<div></div>
<script></script>
<div></div>
<script></script>
<div></div>
</my-element>
</body>
</html>
What is the expected output?
<div></div>
<script></script>
<div></div>
<script></script>
<div></div>
What do you see instead?
<div></div>
<script></script>
I could make some assumptions as to why this is happening, such as the
script tag cannot be executed until the currently executing script
(createdCalblack()) returns control back to the engine, etc, but I really
don't know what's going on. All I know is that this behaviour caught me by
surprise because I'd expect the HTML to be complete even though any
descendant custom elements wouldn't be upgraded yet.
Thanks for looking at this.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.