Skip to content

feat: promisify webContents.savePage() - #16742

Merged
codebytere merged 6 commits into
masterfrom
promisify-savepage
Feb 14, 2019
Merged

codebytere merged 6 commits into
masterfrom
promisify-savepage

Conversation

@codebytere

@codebytere codebytere commented Feb 5, 2019 •

Copy link
Copy Markdown
Member

Description of Change

This PR promisifies webContents.savePage(). There was, unfortunately, no way to perfectly maintain backwards compatibility that I was able to see; previously, this method returned a Boolean and called the callback with an error but now it calls the callback with both the Boolean and the error and returns nothing.

cc @deepak1556 @ckerr

Checklist

Release Notes

Notes: Converted webContents.savePage() to return a Promise instead of taking a callback.

@codebytere
codebytere requested review from a team February 5, 2019 17:03
Comment thread docs/api/web-contents.md Resolved
@codebytere codebytere changed the title feat: promisify webContents.savePage() [wip] feat: promisify webContents.savePage() Feb 6, 2019
@codebytere
codebytere force-pushed the promisify-savepage branch 2 times, most recently from b3f0083 to 1dfca39 Compare February 6, 2019 17:53
@codebytere codebytere changed the title [wip] feat: promisify webContents.savePage() feat: promisify webContents.savePage() Feb 6, 2019

@ckerr ckerr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mostly nits. Elevating to 'Request changes' for the docs error.

Comment thread atom/browser/api/save_page_handler.cc Resolved
Comment thread docs/api/web-contents.md Resolved
@codebytere codebytere added the semver/major incompatible API changes label Feb 12, 2019
Comment thread docs/api/web-contents.md Resolved
@codebytere
codebytere merged commit de27911 into master Feb 14, 2019
@release-clerk

release-clerk Bot commented Feb 14, 2019

Copy link
Copy Markdown

Release Notes Persisted

Converted webContents.savePage() to return a Promise instead of taking a callback.

@codebytere
codebytere deleted the promisify-savepage branch February 14, 2019 17:03
@codebytere

Copy link
Copy Markdown
Member Author

/trop run backport-to 5-0-x

@trop

trop Bot commented Feb 14, 2019

Copy link
Copy Markdown
Contributor

The backport process for this PR has been manually initiated,
sending your 1's and 0's to "5-0-x" here we go! :D

@trop

trop Bot commented Feb 14, 2019

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "5-0-x" cleanly;
you will need to perform this backport manually.

codebytere added a commit that referenced this pull request Feb 14, 2019
* feat: promisify webContents.savePage()

* no need to make compatible w callbacks, we're breaking it

* fix promise resolve type

* address feedback from review

* fix promise return text

* update smoke test
@codebytere codebytere mentioned this pull request Feb 14, 2019
5 of 6 tasks
codebytere added a commit that referenced this pull request Feb 16, 2019
* feat: promisify webContents.savePage()

* no need to make compatible w callbacks, we're breaking it

* fix promise resolve type

* address feedback from review

* fix promise return text

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

Labels

semver/major incompatible API changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants