March 29, 2017 at 8:58 am #24977
You’re absolutely right Bruno.
In the case of both Text Nodes and Element Nodes, you would only find them inside of other Element Nodes. For this reason getting the parent of any type and the parent element node will always provide the same results.
There may be some edge cases of different node types having different behaviors (I wouldn’t be surprised) but for these two node types on a page it is the case.