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

chore: Deprecate options in webcontents.findInPage #15735

Merged
merged 2 commits into from Nov 16, 2018
Merged

Conversation

nitsakh
Copy link
Contributor

@nitsakh nitsakh commented Nov 16, 2018

Description of Change

medialCapitalAsWordStart and wordStart are removed upstream (e6cb6f2).
So lets deprecate them in 4.x and remove in 5.x.

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • tests are changed or added
  • relevant documentation is changed or added
  • PR title follows semantic commit guidelines

Release Notes

Notes: Deprecated findInPage optionswordStart and medialCapitalAsWordStart

@nitsakh nitsakh requested review from a team November 16, 2018 00:00
@@ -288,6 +288,13 @@ WebContents.prototype.getZoomFactor = function (callback) {
})
}

WebContents.prototype.findInPage = function (text, options = {}) {
//TODO (nitsakh): Remove in 5.0
if (options.wordStart || options.medialCapitalAtWordStart)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (options.wordStart || options.medialCapitalAtWordStart)
if (options.wordStart != null || options.medialCapitalAtWordStart != null)

this will catch potential usages where the app passes false in some cases (e.g. when developer is testing) but true in other cases (e.g. when user flips some option)

@nitsakh
Copy link
Contributor Author

nitsakh commented Nov 16, 2018

Need to update for webview also, doing that now.
Didn't need any webview changes as it calls the corresponding webcontents methods.

Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

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

re-approving for merge!

@nitsakh
Copy link
Contributor Author

nitsakh commented Nov 16, 2018

Merging this as macos CI failures are unrelated.

@nitsakh nitsakh merged commit 7973380 into 4-0-x Nov 16, 2018
@release-clerk
Copy link

release-clerk bot commented Nov 16, 2018

Release Notes Persisted

Deprecated findInPage optionswordStart and medialCapitalAsWordStart

@nitsakh nitsakh deleted the deprecate-fip branch November 16, 2018 22:26
ppontes added a commit that referenced this pull request Nov 19, 2018
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.

None yet

3 participants