@@ -17,8 +17,8 @@ checks whether a misspelled word is present, then asynchronously retrieves spell
1717The ` ICoreWebView2ContextMenuTarget ` is extended with ` ICoreWebView2ContextMenuTarget2 ` .
1818This new interface provides:
1919
20- - ** ` HasMisspelledWord ` ** — Read-only BOOL property indicating whether the context menu target
21- contains a misspelled word . This is always available synchronously when the event fires.
20+ - ** ` HasSpellingError ` ** — Read-only BOOL property indicating whether the context menu target
21+ contains a spelling error . This is always available synchronously when the event fires.
2222- ** ` GetSpellCheckSuggestions(handler) ` ** — Asynchronously retrieves spell check suggestions as
2323 ` ICoreWebView2ContextMenuItem ` objects. Each suggestion has a ` Label ` (display text) and
2424 ` CommandId ` (opaque identifier).
@@ -56,10 +56,10 @@ webView->add_ContextMenuRequested(
5656 if (!target2)
5757 return S_OK;
5858
59- // Check if the context menu target has a misspelled word .
60- BOOL hasMisspelledWord = FALSE;
61- CHECK_FAILURE(target2->get_HasMisspelledWord(&hasMisspelledWord ));
62- if (!hasMisspelledWord )
59+ // Check if the context menu target has a spelling error .
60+ BOOL hasSpellingError = FALSE;
61+ CHECK_FAILURE(target2->get_HasSpellingError(&hasSpellingError ));
62+ if (!hasSpellingError )
6363 return S_OK;
6464
6565 // Take deferral — menu will be shown after async callback.
@@ -112,8 +112,8 @@ webView.CoreWebView2.ContextMenuRequested += async (sender, args) =>
112112{
113113 var target = args.ContextMenuTarget;
114114
115- // Check if the context menu target has a misspelled word .
116- if (!target.HasMisspelledWord )
115+ // Check if the context menu target has a spelling error .
116+ if (!target.HasSpellingError )
117117 return;
118118
119119 // Take deferral — menu will be shown after async call completes.
@@ -156,26 +156,26 @@ webView.CoreWebView2.ContextMenuRequested += async (sender, args) =>
156156///
157157/// The host can `QueryInterface` the `ICoreWebView2ContextMenuTarget` returned
158158/// by `ICoreWebView2ContextMenuRequestedEventArgs::get_ContextMenuTarget` to
159- /// obtain this interface. Check `HasMisspelledWord ` to determine whether
159+ /// obtain this interface. Check `HasSpellingError ` to determine whether
160160/// the context menu was invoked on a misspelled word, then call
161161/// `GetSpellCheckSuggestions` to asynchronously retrieve spelling corrections.
162162///
163163/// To apply a suggestion, pass the selected item's `CommandId` to
164164/// `ICoreWebView2ContextMenuRequestedEventArgs::put_SelectedCommandId`.
165165[uuid(f7a3b8c1-2d4e-5f6a-8b9c-0d1e2f3a4b5c), object, pointer_default(unique)]
166166interface ICoreWebView2ContextMenuTarget2 : ICoreWebView2ContextMenuTarget {
167- /// Returns TRUE if the context menu target contains a misspelled word .
167+ /// Returns TRUE if the context menu target contains a spelling error .
168168 /// When TRUE, call `GetSpellCheckSuggestions` to retrieve the available
169169 /// spelling correction suggestions asynchronously.
170- [propget] HRESULT HasMisspelledWord ([out, retval] BOOL* value);
170+ [propget] HRESULT HasSpellingError ([out, retval] BOOL* value);
171171
172172 /// Asynchronously retrieves spell check suggestion options as a collection
173173 /// of context menu items. The handler is invoked immediately if suggestions
174174 /// are already available, or when they become available from the platform
175175 /// spell check engine. Each item's `Label` is the suggestion text and its
176176 /// `CommandId` can be passed to `put_SelectedCommandId` to apply the
177177 /// correction. The handler receives an empty collection if no suggestions
178- /// are available, if `HasMisspelledWord ` is FALSE, or if the underlying
178+ /// are available, if `HasSpellingError ` is FALSE, or if the underlying
179179 /// spell check service does not respond within an internal timeout.
180180 /// Multiple concurrent calls are supported; each handler will be invoked
181181 /// with the same result when suggestions become available.
@@ -211,9 +211,9 @@ namespace Microsoft.Web.WebView2.Core
211211 [interface_name (" ICoreWebView2ContextMenuTarget2" )]
212212 {
213213 /// <summary >
214- /// Returns TRUE if the context menu target contains a misspelled word .
214+ /// Returns TRUE if the context menu target contains a spelling error .
215215 /// </summary >
216- Boolean HasMisspelledWord { get; };
216+ Boolean HasSpellingError { get; };
217217
218218 /// <summary >
219219 /// Asynchronously retrieves spell check suggestions. Each item's
@@ -233,7 +233,7 @@ namespace Microsoft.Web.WebView2.Core
233233| Step | Action | Result |
234234| ------| --------| --------|
235235| 1 | QI for ` Target2 ` from ` ContextMenuTarget ` | ` E_NOINTERFACE ` → old runtime, fall back to default menu |
236- | 2 | Read ` HasMisspelledWord ` | ` TRUE ` → misspelling present; ` FALSE ` → no misspelling |
236+ | 2 | Read ` HasSpellingError ` | ` TRUE ` → spelling error present; ` FALSE ` → no spelling error |
237237| 3 | Call ` GetSpellCheckSuggestions(handler) ` | Handler invoked when suggestions are available |
238238
239239## Suggestion Item Properties
0 commit comments