[轉貼][Javascript] 避免 window.open 被 ios safari browser 阻擋

重點就是不要直接在 callback 裡寫 window.open
改成先建立好 window 再由 callback 指向正確的 url

var mywin = window.open(“about:blank”, “redirect”);
var someCallback = function(url) {
mywin.open(url, “redirect”);
};

How to avoid browser pop-up blockers on window.open