共用方式為


CoreWebView2SaveAsKind Enum

Definition

Specifies Save As kind selection options for ICoreWebView2SaveAsUIShowingEventArgs.

        For HTML documents, we support 3 Save As kinds: HTML_ONLY, SINGLE_FILE and
        COMPLETE. For non-HTML documents, you must use DEFAULT. MIME types of `text/html` and
        `application/xhtml+xml` are considered HTML documents.
public enum CoreWebView2SaveAsKind
type CoreWebView2SaveAsKind = 
Public Enum CoreWebView2SaveAsKind
Inheritance
CoreWebView2SaveAsKind

Fields

Name Value Description
Default 0

Default kind to save non-HTML content. If this kind is selected for an HTML page, the behavior is the same as the HTML_ONLY kind.

HtmlOnly 1

Save the page as HTML. Only the top-level document is saved, excluding subresources.

SingleFile 2

Save the page as MHTML.

Complete 3

Save the page as HTML and download the page-related source files (for example: CSS, JavaScript, images, etc.) in a directory with the same filename prefix.

Remarks

For HTML documents, we support 3 Save As kinds: HtmlOnly, SingleFile and Complete. For non-HTML documents, you must use Default. MIME types of text/html and application/xhtml+xml are considered HTML documents.

Applies to