@@ -150,7 +150,7 @@ void WebView_SaveAsUIShowing(object sender, CoreWebView2SaveAsUIShowingEventArgs
150150 CoreWebView2Deferral deferral = args .GetDeferral ();
151151
152152 // We avoid potential reentrancy from running a message loop in the event
153- // handler. Show the customized dialog later when complete the deferral
153+ // handler. Show the customized dialog later then complete the deferral
154154 // asynchronously.
155155 System .Threading .SynchronizationContext .Current .Post ((_ ) =>
156156 {
@@ -194,31 +194,25 @@ async void ProgrammaticSaveAsExecuted(object target, ExecutedRoutedEventArgs e)
194194# API Details
195195## Win32 C++
196196``` c++
197- // / Specifies save as requested kind selection options for
197+ // / Specifies save as kind selection options for
198198// / `ICoreWebView2SaveAsUIShowingEventArgs`.
199199// /
200- // / When the source is an HTML document, `DEFAULT`, `HTML_ONLY`, `SINGLE_FILE`,
201- // / and `COMPLETE` are valid values. When the source is a non-html,
202- // / only allows to select `DEFAULT`; otherwise, will deny the download
203- // / and return `COREWEBVIEW2_SAVE_AS_UI_KIND_NOT_SUPPORTED`.
204- // /
205- // / The content type/format is a MIME type, indicated by the source
206- // / server side and identified by the browser. It's not related to the
207- // / file’s type or extension. MIME type of `text/html`,
208- // / `application/xhtml+xml` are considered as html page.
209- [v1_enum] typedef enum COREWEBVIEW2_SAVE_AS_UI_KIND {
200+ // / For HTML documents, we support 3 save as kinds: HTML_ONLY, SINGLE_FILE and
201+ // / COMPLETE. Non-HTML documents, you must use DEFAULT. MIME type of `text/html`,
202+ // / `application/xhtml+xml` are considered as HTML documents.
203+ [v1_enum] typedef enum COREWEBVIEW2_SAVE_AS_KIND {
210204 /// Default to save for a non-html content. If it is selected for a html
211205 /// page, it’s same as HTML_ONLY option.
212- COREWEBVIEW2_SAVE_AS_UI_KIND_DEFAULT ,
206+ COREWEBVIEW2_SAVE_AS_KIND_DEFAULT ,
213207 /// Save the page as html
214- COREWEBVIEW2_SAVE_AS_UI_KIND_HTML_ONLY ,
208+ COREWEBVIEW2_SAVE_AS_KIND_HTML_ONLY ,
215209 /// Save the page as mhtml
216- COREWEBVIEW2_SAVE_AS_UI_KIND_SINGLE_FILE ,
210+ COREWEBVIEW2_SAVE_AS_KIND_SINGLE_FILE ,
217211 /// Save the page as html, plus, download the page related source files
218212 /// (for example CSS, JavaScript, images, and so on) in a directory with
219213 /// the same filename prefix.
220- COREWEBVIEW2_SAVE_AS_UI_KIND_COMPLETE ,
221- } COREWEBVIEW2_SAVE_AS_UI_KIND ;
214+ COREWEBVIEW2_SAVE_AS_KIND_COMPLETE ,
215+ } COREWEBVIEW2_SAVE_AS_KIND ;
222216
223217// / Status of a programmatic save as call, indicates the result
224218// / for method `ShowSaveAsUI`
@@ -229,20 +223,16 @@ async void ProgrammaticSaveAsExecuted(object target, ExecutedRoutedEventArgs e)
229223 COREWEBVIEW2_SAVE_AS_UI_SUCCESS,
230224 /// Could not perform Save As because the destination file path is an invalid path.
231225 ///
232- /// It is considered as invalid when:
233- /// the path is empty or a relative path, the parent directory doesn't
234- /// exist, or the path is a directory.
235- ///
236- /// Parent directory can be itself, if the path is root directory, or
237- /// root disk. When the root doesn't exist, the path is invalid.
226+ /// It is considered as invalid when the path is empty, a relative path, a directory,
227+ /// or the parent path doesn't exist
238228 COREWEBVIEW2_SAVE_AS_UI_INVALID_PATH,
239229 /// Could not perform Save As because the destination file path already exists and
240230 /// replacing files was not allowed by the ` AllowReplace ` property.
241231 COREWEBVIEW2_SAVE_AS_UI_FILE_ALREADY_EXISTS,
242232 /// Could not perform Save As when the ` Kind ` property selection not
243233 /// supported because of the content MIME type or system limits
244234 ///
245- /// MIME type limits please see the emun ` COREWEBVIEW2_SAVE_AS_UI_KIND `
235+ /// MIME type limits please see the emun ` COREWEBVIEW2_SAVE_AS_KIND `
246236 ///
247237 /// System limits might happen when select ` HTML_ONLY ` for an error page,
248238 /// select ` COMPLETE ` and WebView running in an App Container, etc.
@@ -257,9 +247,8 @@ interface ICoreWebView2_20 : IUnknown {
257247 /// Programmatically trigger a save as action for the current top-level document.
258248 /// The ` SaveAsUIShowing ` event will be raised.
259249 ///
260- /// Opens a system modal dialog by default. If it was already opened, this method
261- /// would not open another one. If the ` SuppressDefaultDialog ` is TRUE, won't open
262- /// the system dialog.
250+ /// Opens a system modal dialog by default. If the ` SuppressDefaultDialog ` is TRUE,
251+ /// won't open the system dialog.
263252 ///
264253 /// The method can return a detailed info to indicate the call's result.
265254 /// Please see COREWEBVIEW2_SAVE_AS_UI_RESULT
@@ -326,7 +315,7 @@ interface ICoreWebView2SaveAsUIShowingEventArgs : IUnknown {
326315 /// not exist, save as will be denied and return COREWEBVIEW2_SAVE_AS_INVALID_PATH.
327316 ///
328317 /// If the associated download completes successfully, a target file will be saved at
329- /// this location. If the Kind property is ` COREWEBVIEW2_SAVE_AS_UI_KIND_COMPLETE ` ,
318+ /// this location. If the Kind property is ` COREWEBVIEW2_SAVE_AS_KIND_COMPLETE ` ,
330319 /// there will be an additional directory with resources files.
331320 ///
332321 /// The default value is a system suggested path, based on users' local environment.
@@ -352,17 +341,17 @@ interface ICoreWebView2SaveAsUIShowingEventArgs : IUnknown {
352341 [ propget] HRESULT AllowReplace ([ out, retval] BOOL* value);
353342
354343 /// How to save documents with different kind. See the enum
355- /// COREWEBVIEW2_SAVE_AS_UI_KIND for a description of the different options.
344+ /// COREWEBVIEW2_SAVE_AS_KIND for a description of the different options.
356345 /// If the kind isn't allowed for the current document,
357346 /// COREWEBVIEW2_SAVE_AS_UI_KIND_NOT_SUPPORTED will be returned from ShowSaveAsUI.
358347 ///
359- /// The default value is COREWEBVIEW2_SAVE_AS_UI_KIND_DEFAULT
348+ /// The default value is COREWEBVIEW2_SAVE_AS_KIND_DEFAULT
360349 ///
361350 /// Set the kind for save as
362- [ propput] HRESULT Kind ([ in] COREWEBVIEW2_SAVE_AS_UI_KIND value);
351+ [ propput] HRESULT Kind ([ in] COREWEBVIEW2_SAVE_AS_KIND value);
363352
364353 /// Get the kind for save as
365- [ propget] HRESULT Kind ([ out, retval] COREWEBVIEW2_SAVE_AS_UI_KIND * value);
354+ [ propget] HRESULT Kind ([ out, retval] COREWEBVIEW2_SAVE_AS_KIND * value);
366355}
367356
368357// / Receive the result for `ShowSaveAsUI` method
0 commit comments