feat: remove need to manually call monitorRenderer#271
Conversation
README.md
Outdated
| devtron.install(); // call this function at the top of your file | ||
| ``` | ||
|
|
||
| or call `devtron.install()` inside the `app.whenReady()` callback like this: |
There was a problem hiding this comment.
Just wondering, is there a reason why a consumer would prefer to call devtron.install() inside of app.whenReady()? Is there any functional difference between doing that and calling devtron.install() at the top of the file?
There was a problem hiding this comment.
There's no difference between the two, but it's probably better to call devtron.install() at the top of the file.
Should I remove the readme section about installing devtron inside app.whenReady() ?
There was a problem hiding this comment.
Yea, if there's no functional difference it's probably better to have only one section so it's more clear for users.
One advantage to installing it inside of app.whenReady() is that you can more easily dynamically import the module (which requires an await) if and only if your app isn't packaged, since most developers aren't going to want to ship with this package in production.
* feat: remove need to manually call `monitorRenderer` * docs: update install instructions * docs: correct devtron import to use `@electron/devtron` * docs: remove `app.whenReady()` install example from README
This PR:
monitorRendererin preload files of an Electron app. Devtron now injects a preload script usingses.registerPreloadScriptto track IPC events received byipcRenderer.sandbox: trueis set inwebPreferences.