像我选github登录,window.open一个github的登录页面,登录成功后,原本的sf页面自动刷新了
这个新打开的github页面是如何通知到sf主页面的呢
Github 授权后会跳转到这个应用设置好的回调页面来,这个页面就是 SF 自己写的,没样式,但有一段 JS 代码。
窗口 A 打开了窗口 B,在窗口 B 里通过 window.opener 就可以得到窗口 A。
window.opener
已经得到窗口 A (一个 window 对象)了,你想咋触发里面的方法就咋触发呗。
window
window.close() 关闭自己这个不用教吧?
window.close()
https://developer.mozilla.org...
1.4m articles
1.4m replys
5 comments
56.8k users