Fix for safari bug. Only supports setAttribute for .type setting. Otherwise getting TypeError: Attempted to assign to readonly property