New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add window.loadFile and webContents.loadFile helper methods #11565
Conversation
What do you think about the idea of adding a
|
Not a fan tbh, I much prefer the explicit "create then navigate" approach we currently use. This method just makes it easier/safer for people to navigate to local files 👍 |
Yeah once this goes through I'll follow up with a PR to update docs and usage in our own code. I didn't realize we had so much string templating |
I'm with you on that, especially because you can't attach listeners to something that hasn't been created yet - and therefore wouldn't be able to catch errors emitted via EventEmitter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a few things pending for future PRs in comments, but for the scope of this PR this looks good to me!
See new api: electron#11565
* Simplify loading of html See new api: #11565 * Update first-app.md * Update first-app.md
Closes #11560