Check whether a DOM element is contained by another one