Skip to content

Instantly share code, notes, and snippets.

@lilywang711
Last active July 25, 2018 07:36
Show Gist options
  • Save lilywang711/2c863ef197378621e224cc95a478d440 to your computer and use it in GitHub Desktop.
Save lilywang711/2c863ef197378621e224cc95a478d440 to your computer and use it in GitHub Desktop.
window.open() not working on safari

因安全机制,window.open在safari 浏览器中屏蔽掉了, 解决办法如下

let newTab = window.open()
setTimeout(() => {
  newTab = 'https://www.baidu.com'
}, 500)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment