UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
Steps to reproduce the problem:
1. Load an instance of a web component with a slot element in its shadow DOM.
2. Attach a slotchange listener to the slot.
3. Set innerHTML on the web component instance to a single line of text.
4. Repeat step (3).
5. Set innerHTML to a multiline string. (notice the difference)
I have created a jsbin example here: https://jsbin.com/xivunad/edit?html,js,console,output
Notice the difference between console output (showing slotchange events) and innerHTML changes rendered to the screen.
What is the expected behavior?
slotchange should fire every time innerHTML is set, including cases when a single line of text (1 TextNode) is being replaced by another single line of text (1 TextNode).
What went wrong?
slotchange only fires consistently when innerHTML is set to multiple lines of text or to text with HTML in it.
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: 53.0.2785.143 Channel: n/a
OS Version:
Flash Version: Shockwave Flash 21.0 r0
See discussion here: https://github.com/w3c/webcomponents/issues/592
|
Deleted:
jsbin.xivunad.15.html
1.6 KB
|
Comment 1 by hayato@chromium.org
, Oct 24 2016