Skip to content

Commit d1299fc

Browse files
authored
Update FindOnPage.md
Removed Find Direction and updated documentation
1 parent 5e6d5dd commit d1299fc

File tree

1 file changed

+5
-44
lines changed

1 file changed

+5
-44
lines changed

FindOnPage.md

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
The WebView2Find API offers methods and events for text finding and navigation
66
within a WebView2 control. It enables developers to programmatically initiate Find
77
operations, navigate Find results, suppress default UI, and customize Find options
8-
like query and Find direction. It also tracks the status of operations, indicating
8+
like find query. It also tracks the status of operations, indicating
99
completion, match count changes, and match index changes.
1010

1111
## Examples
@@ -27,8 +27,7 @@ completion, match count changes, and match index changes.
2727
To initiate a Find operation in a WebView2 control, use the `StartAsync` method.
2828
This method allows setting the Find term and Find parameters via the
2929
`ICoreWebView2FindOptions` interface. Only one Find session can be active per
30-
WebView2 environment. Starting another with the same option will adjust
31-
the active match index based on the selected Find Direction.
30+
WebView2 environment.
3231
### Create/Specify a Find Option
3332
#### WIN32 C++
3433

@@ -263,16 +262,6 @@ void ActiveMatchIndexChangedSample()
263262
## API Details
264263
```cpp
265264

266-
/// Specifies the direction of Find Parameters.
267-
// MSOWNERS: core ([email protected])
268-
[v1_enum]
269-
typedef enum COREWEBVIEW2_FIND_DIRECTION {
270-
/// Specifies a forward Find in the document.
271-
COREWEBVIEW2_FIND_DIRECTION_FORWARD,
272-
/// Specifies a backwards Find in the document.
273-
COREWEBVIEW2_FIND_DIRECTION_BACKWARD,
274-
} COREWEBVIEW2_FIND_DIRECTION;
275-
276265

277266
/// Interface that provides methods related to the environment settings of CoreWebView2.
278267
/// This interface allows for the creation of new Find options objects.
@@ -414,16 +403,6 @@ interface ICoreWebView2Find : IUnknown {
414403
// MSOWNERS: core ([email protected])
415404
[uuid(52a04b23-acc8-5659-aa2f-26dbe9faafde), object, pointer_default(unique)]
416405
interface ICoreWebView2FindOptions : IUnknown {
417-
/// Gets the `FindDirection` property.
418-
// MSOWNERS: core ([email protected])
419-
[propget] HRESULT FindDirection([out, retval] COREWEBVIEW2_FIND_DIRECTION* value);
420-
421-
422-
///
423-
// MSOWNERS: core ([email protected])
424-
[propput] HRESULT FindDirection([in] COREWEBVIEW2_FIND_DIRECTION value);
425-
426-
427406
/// Gets the `FindTerm` property.
428407
///
429408
/// The caller must free the returned string with `CoTaskMemFree`. See
@@ -478,7 +457,7 @@ interface ICoreWebView2_17 : IUnknown {
478457

479458
### Setting Up Find Options with MIDL3
480459

481-
### CoreWebView2 Find Configuration and Direction
460+
### CoreWebView2 Find Configuration
482461

483462

484463

@@ -487,17 +466,6 @@ interface ICoreWebView2_17 : IUnknown {
487466
```csharp
488467
namespace Microsoft.Web.WebView2.Core
489468
{
490-
/// Specifies the direction of Find Parameters.
491-
[ms_owner("core", "[email protected]")]
492-
[availability("staging")]
493-
enum CoreWebView2FindDirection
494-
{
495-
/// Specifies a forward Find in the document.
496-
Forward,
497-
/// Specifies a backwards Find in the document.
498-
Backward,
499-
};
500-
501469
/// <com>
502470
/// Interface providing methods to access the Find operation functionalities in the CoreWebView2.
503471
/// </com>
@@ -533,9 +501,6 @@ runtimeclass CoreWebView2FindOptions : [default]ICoreWebView2FindOptions {}
533501
/// Gets or sets the Find term used for the Find operation. Returns the Find term.
534502
String FindTerm { get; set; };
535503

536-
/// Gets or sets the direction of the Find operation (forward or backward). Returns the Find direction.
537-
CoreWebView2FindDirection FindDirection { get; set; };
538-
539504
/// Determines if the Find operation is case sensitive. Returns TRUE if the Find is case sensitive, FALSE otherwise.
540505
/// The locale used to determine case sensitivity is the document's language specified by the HTML lang attribute. If unspecified then the WebView2's UI locale
541506
/// typically provides a default handling approach, while the document's language settings (e.g., specified using the HTML lang attribute) can override these defaults to apply locale-specific rules. This dual consideration
@@ -583,8 +548,6 @@ runtimeclass CoreWebView2FindOptions : [default]ICoreWebView2FindOptions {}
583548
/// StartAsync Completion: The asynchronous action completes when the UI has been displayed with the Find term in the UI bar, and the matches have populated on the counter on the Find bar.
584549
/// There may be a slight latency between the UI display and the matches populating in the counter.
585550
/// The MatchCountChanged and ActiveMatchIndexChanged events are only raised after StartAsync has completed, otherwise they will have their default values (-1 for ActiveMatchIndex and 0 for TotalMatchCount).
586-
/// When initiating a Find session while another session is in progress, the behavior of
587-
/// the active match index depends on the direction set for the Find operation (forward or backward).
588551
/// However, calling StartFind again during an ongoing Find operation does not resume from the point
589552
/// of the current active match. For example, given the text "1 1 A 1 1" and initiating a Find session for "A",
590553
/// then starting another Find session for "1", it will start searching from the beginning of the document,
@@ -595,14 +558,12 @@ runtimeclass CoreWebView2FindOptions : [default]ICoreWebView2FindOptions {}
595558

596559

597560
/// Navigates to the next match in the document.
598-
/// If there are no matches to Find, FindNext will wrap around to the first match if the search direction is forward,
599-
/// or to the last match if the search direction is backward.
561+
/// If there are no matches to Find, FindNext will wrap around to the first match.
600562
/// If called when there is no Find session active, FindNext will silently fail.
601563
void FindNext();
602564

603565
/// Navigates to the previous match in the document.
604-
/// If there are no matches to Find, FindPrevious will wrap around to the last match if the search direction is forward,
605-
/// or to the first match if the search direction is backward.
566+
/// If there are no matches to Find, FindPrevious will wrap around to the last match.
606567
/// If called when there is no Find session active, FindPrevious will silently fail.
607568
void FindPrevious();
608569

0 commit comments

Comments
 (0)