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 will-attach-webview event #8584

Merged
merged 9 commits into from Feb 9, 2017

Conversation

Projects
None yet
4 participants
@kevinsawicki
Contributor

kevinsawicki commented Feb 3, 2017

This event is similar to new-window, in that it allows you to configure the webPreferences of the <webview>'s webContents before it gets read in and calling event.preventDefault() will destroy the guest page.

This event can be used to enforce/configure settings in the main process for created webviews and also allow finer grain option setting than the current <webview> attributes support.

Closes #2749

@@ -502,6 +502,18 @@ win.loadURL('http://github.com')
Emitted when the devtools window instructs the webContents to reload
#### Event: 'will-attach-webview'
Returns:

This comment has been minimized.

@zeke

zeke Feb 3, 2017

Member

Might want to add an "Emitted when..." blurb here, which most events have.

@zeke

zeke Feb 3, 2017

Member

Might want to add an "Emitted when..." blurb here, which most events have.

Show outdated Hide outdated docs/api/web-contents.md Outdated

@groundwater groundwater added triage/pr and removed triage/pr labels Feb 6, 2017

@kevinsawicki kevinsawicki merged commit acedc3e into master Feb 9, 2017

7 of 9 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
electron-linux-arm Build #5460621 succeeded in 67s
Details
electron-linux-ia32 Build #5460622 succeeded in 62s
Details
electron-linux-x64 Build #5460623 succeeded in 133s
Details
electron-mas-x64 Build #3377 succeeded in 7 min 33 sec
Details
electron-osx-x64 Build #3387 succeeded in 8 min 4 sec
Details
electron-win-ia32 Build #2390 succeeded in 7 min 58 sec
Details
electron-win-x64 Build #2375 succeeded in 7 min 59 sec
Details

@kevinsawicki kevinsawicki deleted the new-webview-event branch Feb 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment