getAttribute method doesn't exist on all javascript object ? Only on element ?