Interface nsIWebBrowserPersistDocumentType

Interface representing a document that can be serialized with nsIWebBrowserPersist; it may or may not be in this process. Some information is exposed as attributes, which may or may not reflect changes made to the underlying document; most of these are self-explanatory from their names and types.

Hierarchy

Properties

baseURI: string
cacheKey: number

The cache key. Unlike in nsISHEntry, where it's wrapped in an nsISupportsPRUint32, this is just the integer.

characterSet: string
contentDisposition: string
contentType: string
cookieJarSettings: nsICookieJarSettings
documentURI: string
isClosed: boolean
isPrivate: boolean
persistFlags: number

This attribute is set by nsIWebBrowserPersist implementations to propagate persist flags that apply to the DOM traversal and serialization (rather than to managing file I/O).

postData: nsIInputStream
principal: nsIPrincipal
referrerInfo: nsIReferrerInfo
title: string

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Returns SHEntryRef

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Walk the DOM searching for external resources needed to render it. The visitor callbacks may be called either before or after readResources returns.

    See

    nsIWebBrowserPersistResourceVisitor

    Parameters

    • aVisitor: nsIWebBrowserPersistResourceVisitor

    Returns void

  • Serialize the document's DOM.

    See

    nsIDocumentEncoder

    Parameters

    • aStream: nsIOutputStream

      The output stream to write the document to.

    • aURIMap: nsIWebBrowserPersistURIMap

      Optional; specifies URI rewriting to perform on external references (as read by readResources). If given, also causes relative hyperlinks to be converted to absolute in the written text.

    • aRequestedContentType: string

      The desired MIME type to save the document as; optional and defaults to the document's type. (If no encoder exists for that type, "text/html" is used instead.)

    • aEncoderFlags: number

      Flags to pass to the encoder.

    • aWrapColumn: number

      Desired text width, ignored if wrapping is not specified by the encoding flags, or if 0.

    • aCompletion: nsIWebBrowserPersistWriteCompletion

      Callback invoked when writing is complete. It may be called either before or after writeContent returns.

    Returns void

Generated using TypeDoc