Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
337 views
in Technique[技术] by (71.8m points)

nw.js 内webviwe 获取父页面window 属性?

在nw.js内利用<webview class="iframe-content"></webview>进行访问连接。
登录的时候会存储一下token 这个页面是在原页面上的也就是本地

        window.globalToken = result.accessToken;
        let loginBtn = document.getElementById('login');
        let a = loginBtn.getElementsByTagName('a')[0];
        a.setAttribute('href', './index.html');
        a.click();

然后点击导航会赋值webviewsrc的属性跳转到页面,但是跳转的这个页面怎么拿到window.globalToken这个token 呢,试了很多次都不行。求指教


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

63 comments

56.6k users

...