-
-
Notifications
You must be signed in to change notification settings - Fork 292
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: add find-in-page, closes #585 #593
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how this feature might be useful for desktop apps tbh. It only returns whether a match has been found or not, it doesn't return the matched word nor the html element that contains it. I can't think of a use case for it at all.
This feature highlight the search text automatically. |
Ah I see, I didn't know it highlights it too. I see that electron has this event https://www.electronjs.org/docs/latest/api/web-contents#event-found-in-page with information about the matched text, can we provide some of these? |
I want to provide these information but I can't find API to do it :( |
Additionally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sill don't see much value in this API but I will leave that for @wusyong to decide and I will just do a review.
Co-authored-by: Amr Bashir <[email protected]>
Co-authored-by: Amr Bashir <[email protected]>
Co-authored-by: Amr Bashir <[email protected]>
Co-authored-by: Amr Bashir <[email protected]>
44b5b85
to
95712db
Compare
If electron has it, it should be possible for webview2 perhaps (since they are both chromium)? This method will be really awkward if it doesn't support Windows which is the major desktop most users use |
Webview2 builtin these feature with search box. But webview2 doesn't provide the API to find text in page :( |
Maybe worth opening a feature request at webview2 feedback repo and hold this PR until it happens? |
How about using
Many projects are using the same functionality in Electron. This functionality is useful for some document viewer to search its content. |
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information