-
Notifications
You must be signed in to change notification settings - Fork 816
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil Version
v4.36.1
Current Behavior
When executing the following code the childNodes
property value is an empty Array. The __childNodes
property value is a NodeList with a single item. The later is correct, the first not.
let label = document.createElement("ion-label");
label.textContent = "Hello world";
console.log(label.childNodes); // Empty Array
console.log(label.__childNodes); // NodeList with a Text Node
Expected Behavior
The childNodes
property value should be the same as the __childNodes
result: a NodeList with a single Text Node. The childNodes
property value should never be an Array, but always a (live) NodeList for compatibility with the Node interface:
https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes
System Info
Steps to Reproduce
Go to URL: https://ionicframework.com/docs/usage/v8/label/basic/demo.html?ionic:mode=ios
Enter the following script in the dev console.
let label = document.createElement("ion-label");
label.textContent = "Hello world";
console.log(label.childNodes); // Empty Array
console.log(label.__childNodes); // NodeList with a Text Node
Code Reproduction URL
https://ionicframework.com/docs/usage/v8/label/basic/demo.html?ionic:mode=ios
Additional Information
No response