fix related to pr #298, check that getAttribute method is available on elements...it isn't if an element is a shadow root