일렉트론 렌더러 내 웹뷰 executeJavaScript 사용 시 데이터 수집
조회수 1381회
renderer html
webview id="github" src="https://github.com"></webview
renderer js
const githubWebview = document.getElementById('github');
console.log('start');
let title = "";
githubWebview.executeJavascript(`
var title = document.title;
title;
`, function(res){
console.log(res);
});
console.log('end');
이렇게 실행하면 start -> end -> GitHub 이렇게 순서대로 나오는데
start -> GitHub -> end 순으로 나오게 할 수 있나요? 그리고 콜백에서 let title 에 값을
할당할 수 있는지.. 어떻게 해보려고해도 방법을 모르겠네요 ㅜ
도움 부탁드립니다.
-
(•́ ✖ •̀)
알 수 없는 사용자
댓글 입력