Check canUseDOM before calling isEventSupported