8000 feat: make zoomLevel/zoomFactor sync by codebytere · Pull Request #16410 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: make zoomLevel/zoomFactor sync #16410

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

Merged
merged 2 commits into from
Jan 21, 2019
Merged

Conversation

codebytere
Copy link
Member
@codebytere codebytere commented Jan 15, 2019

Description of Change

Convert webContents getZoomLevel and getZoomFactor to be sync methods.

cc @ckerr

Checklist

Release Notes

Notes: Converted zoomLevel() and zoomFactor() for webContents and <webview> to return a promise instead taking a callback.

@codebytere codebytere requested a review from a team January 15, 2019 19:13
@codebytere codebytere requested a review from a team January 15, 2019 19:20
@codebytere codebytere changed the title [wip] feat: promisify zoomLevel and zoomFactor feat: promisify zoomLevel and zoomFactor Jan 16, 2019
@codebytere codebytere force-pushed the promisify-getzoomlevel branch from 92326cd to 6e0b22b Compare January 17, 2019 00:09
Copy link
Member
@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetZoomFactor and GetZoomLevel were originally implemented using webFrame apis, hence they had to rely on ipc and had an async api signature. It then got refactored to rely on the browser side ZoomController. These apis no longer need to be async, its better to deprecate the current signature in favor of that instead of promisification.

@codebytere codebytere force-pushed the promisify-getzoomlevel branch from 707356c to cf5d11d Compare January 17, 2019 16:37
@codebytere codebytere changed the title feat: promisify zoomLevel and zoomFactor feat: make zoomLevel/zoomFactor sync Jan 17, 2019
@codebytere codebytere force-pushed the promisify-getzoomlevel branch from cf5d11d to 5562f02 Compare January 17, 2019 19:25
Copy link
Member
@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a plan to handle the deprecations of the async signatures ?

@codebytere codebytere force-pushed the promisify-getzoomlevel branch from a469044 to d85402a Compare January 18, 2019 16:42
@codebytere
Copy link
Member Author

Must be merged with: electron/typescript-definitions#119

@codebytere codebytere force-pushed the promisify-getzoomlevel branch from d85402a to 2133f87 Compare January 18, 2019 16:56
@codebytere codebytere force-pushed the promisify-getzoomlevel branch from 2133f87 to 5454cd0 Compare January 18, 2019 16:57
@codebytere codebytere merged commit 3ca87d2 into master Jan 21, 2019
@release-clerk
Copy link
release-clerk bot commented Jan 21, 2019

Release Notes Persisted

Converted zoomLevel() and zoomFactor() for webContents and <webview> to return a promise instead taking a callback.

@codebytere codebytere deleted the promisify-getzoomlevel branch January 21, 2019 07:40
akisctx pushed a commit to akisctx/electron that referenced this pull request Jan 22, 2019
* feat: make zoomLevel/zoomFactor sync

* update ts defs dep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0