juan valdez juan valdez - 1 year ago 59
Javascript Question

Why does Element.children fail for Safari?

but not for Chrome, Opera and Firefox?

I noticed that Safari appends

with what appears to be the number of children in
. Is this expected behavior and if so why the divergence from what the other browsers do?

$A.forEach(this.E.mi_control.children, function (val) {
}, this);


This is b.c. not every browser implements the DOM consistently. In this case, Safari adds an extra property to your children, namely length.

Just filter this property and your results should be consistent.