HTML parser: handle shadow dom elements.