重點就是不要直接在 callback 裡寫 window.open
改成先建立好 window 再由 callback 指向正確的 url
var mywin = window.open(“about:blank”, “redirect”);
var someCallback = function(url) {
mywin.open(url, “redirect”);
};
Easy is power
重點就是不要直接在 callback 裡寫 window.open
改成先建立好 window 再由 callback 指向正確的 url
var mywin = window.open(“about:blank”, “redirect”);
var someCallback = function(url) {
mywin.open(url, “redirect”);
};