Why does the object comparison in line 26 return false, even though, line 25 clearly shows element is of type Text? Using === makes no difference.
24 console.log(element)
25 console.log(element.constructor)
26 console.log(element.constructor == Text)