fix: don't handle browser messages before document element is created (#19718)

* fix: don't handle browser messages before document element is created

* fix: bind ElectronApiServiceImpl later

DidCreateDocumentElement is called before the ElectronApiServiceImpl
gets bound.

* chore: add comment
This commit is contained in:
Cheng Zhao 2019-08-13 02:38:41 +09:00 committed by Samuel Attard
parent 398c5d553d
commit 04dbd5c53f
5 changed files with 90 additions and 35 deletions

View file

@ -0,0 +1,9 @@
<html>
<body>
<script type="text/javascript" charset="utf-8">
require('fs').readdir(process.cwd(), () => {
require('electron').ipcRenderer.send('async-node-api-done');
})
</script>
</body>
</html>