hal / elemento

Builder API and other goodies for Elemental2

Home Page:https://hal-console.gitbook.io/elemento/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Foreach loop in body observer throws class cast exception in chrome

vegegoku opened this issue · comments

iterate over a node list received from mutation observer with foreach

for (Node node : nodes) {
}

it throws class cast exception
and this happens when the node is not an element, but a text or comment node
in firefox it works without errors

the solution for this is to use normal loops and do Js.uncheckedCast() to node, then we check the type of the node if it is an element node.

3519d78 should fix the issue. @vegegoku could you please test if that works for you?

@hpehl this works now, thank you so much.

Fixed by 3519d78