`editor.doesElementContainSelection`

Above is the new test for the double–nesting.