New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 657981 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

insertRow called under shadowDOM v1 results in empty childNodes array on parents

Reported by mw...@pint.com, Oct 20 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/53.0.2785.143 Chrome/53.0.2785.143 Safari/537.36

Steps to reproduce the problem:
```js
var x = document.createElement('div');
x.attachShadow({mode:'open'});
var shadowRoot = x.shadowRoot;
shadowRoot.appendChild(document.createElement('table'));
shadowRoot.firstChild.insertRow();
console.log(shadowRoot.firstChild.childElementCount); // correctly returns 1
console.log(shadowRoot.firstChild.childNodes); // incorrectly returns [ ] instead of [<tbody></tbody>]
```

What is the expected behavior?
childNodes/children should return an array with the elements added through insertRow

What went wrong?
`shadowRoot.firstChild.childElementCount` correctly returns
`shadowRoot.firstChild.childNodes);` incorrectly returns [ ] instead of [<tbody></tbody>]

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 53.0.2785.143  Channel: n/a
OS Version: Ubuntu 16.04
Flash Version: Shockwave Flash 17.0 r0

`childNodes` returns correct array under v0 implementation.
`childNodes` returns correct array if appendChild(document.createElement('tr')) was used instead.
 
Screenshot from 2016-10-20 13:14:20.png
55.9 KB View Download

Comment 1 by mw...@pint.com, Oct 20 2016

Seems the issue was that shadydom polyfill (https://github.com/webcomponents/shadydom) was included in the page, even v1 was already supported in chromium 53, the element got polyfilled. Notice that there's not #shadow-root under the node's expansion in the console.

Comment 2 by tkent@chromium.org, Oct 20 2016

Components: -Blink>DOM Blink>DOM>ShadowDOM
Cc: krajshree@chromium.org
Labels: Needs-Feedback
Unable to reproduce the issue on Ubuntu 14.04 using chrome reported version #53.0.2785.143 and chrome stable #54.0.2840.71 as per comment #0

Attached a screen cast for reference.

Reporter@ - Could you please check this issue on chrome stable #54.0.2840.71 by creating a new profile without any apps and extensions and please let us know if the issue still persist or not.
657981.ogv
1.1 MB View Download
Owner: dominicc@chromium.org
Status: WontFix (was: Unconfirmed)
I cannot reproduce this in Chrome 55.0.2883.54 (Official Build) beta (64-bit):

http://jsbin.com/mohalitege/1/edit?html,output

Outputs 1,1,[object HTMLTableSectionElement] which is what I would expect.

Sign in to add a comment