Skip to content
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

feat: make async webContents / <webview> methods return a Promise #18792

Merged
merged 1 commit into from Jun 17, 2019

Conversation

@miniak
Copy link
Contributor

miniak commented Jun 14, 2019

Description of Change

Makes it possible to check the success / failure of these APIs:

  • contents.insertCSS()
  • contents.insertText()
  • contents.setLayoutZoomLevelLimits()
  • contents.setVisualZoomLevelLimits()
  • <webview>.insertCSS()
  • <webview>.insertText()
  • <webview>.send()
  • <webview>.sendInputEvent()
  • <webview>.setLayoutZoomLevelLimits()
  • <webview>.setVisualZoomLevelLimits()
  • <webview>.print()

It also simplifies the code. This is enabled by the ipcRendererUtils.invoke() / ipcMainUtils.handle() helpers and the promisification of the APIs.

Checklist

Release Notes

Notes: All async webContents / <webview> methods now return a Promise.

@miniak miniak referenced this pull request Jun 14, 2019
6 of 6 tasks complete
@miniak miniak requested review from brenca and ckerr Jun 14, 2019
@miniak miniak self-assigned this Jun 14, 2019
@miniak miniak force-pushed the miniak/async-methods branch from b9c75a1 to c9a8658 Jun 14, 2019
@zcbenz
zcbenz approved these changes Jun 14, 2019
@miniak miniak force-pushed the miniak/async-methods branch from c9a8658 to 741e92a Jun 14, 2019
@electron-cation electron-cation bot removed the new-pr 🌱 label Jun 15, 2019
@miniak miniak requested a review from codebytere Jun 15, 2019
@alexeykuzmin alexeykuzmin merged commit deebde6 into master Jun 17, 2019
12 of 13 checks passed
12 of 13 checks passed
Artifact Comparison Changes Detected
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
build-linux Workflow: build-linux
Details
build-mac Workflow: build-mac
Details
electron-arm-testing Build #20190614.46 succeeded
Details
electron-arm64-testing Build #20190614.46 succeeded
Details
lint Workflow: lint
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

release-clerk bot commented Jun 17, 2019

Release Notes Persisted

All async webContents / <webview> methods now return a Promise.

@alexeykuzmin alexeykuzmin deleted the miniak/async-methods branch Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.