Added support for checking class name as well as tag name, useful for custom elements or divs