A resource within the inspected page, such as a document, a script, or an image.

interface Resource {
    url: string;
    getContent?(): Promise<object>;
    setContent?(
        content: string,
        commit: boolean,
    ): Promise<{ [key: string]: any }>;
}
Index
url: string

The URL of the resource.

  • Gets the content of the resource.

    Returns Promise<object>

    Unsupported on Firefox at this time.

  • Sets the content of the resource.

    Parameters

    • content: string

      New content of the resource. Only resources with the text type are currently supported.

    • commit: boolean

      True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.

    Returns Promise<{ [key: string]: any }>

    Unsupported on Firefox at this time.