refined 'isNative' for headless environment, avoid using DOM methods as templates