Skip to content

Extension

Namespace: PuppeteerSharp

public abstract class Extension

Represents an Extension instance installed in the browser.

Inheritance: object

<p>This API is experimental.</p>

View source

Extension(string, string, string, string, bool)

Section titled “Extension(string, string, string, string, bool)”
protected Extension(string id, string version, string name, string path, bool enabled)

Initializes a new instance of the Extension class.

Parameters

Name Type Description
id string The extension ID.
version string The extension version.
name string The extension name.
path string The file system path of the extension.
enabled bool Whether the extension is enabled.

View source

public bool Enabled { get; }

Gets a value indicating whether the extension is enabled.

Value: bool

View source

public string Id { get; }

Gets the ID of the extension.

Value: string

View source

public string Name { get; }

Gets the name of the extension.

Value: string

View source

public string Path { get; }

Gets the path in the file system where the extension is located.

Value: string

View source

public string Version { get; }

Gets the version of the extension.

Value: string

View source

public abstract Task<IReadOnlyList<IPage>> PagesAsync()

Returns the list of the visible pages of the extension.

Returns: Task<IReadOnlyList<IPage>> — A task that resolves to the list of pages.

View source

public abstract Task TriggerActionAsync(IPage page)

Triggers an extension default action on the given page.

Parameters

Name Type Description
page IPage The page to trigger the action on.

Returns: Task — A task that completes when the action is triggered.

View source

public abstract Task<IReadOnlyList<WebWorker>> WorkersAsync()

Returns the list of the currently active service workers of the extension.

Returns: Task<IReadOnlyList<WebWorker>> — A task that resolves to the list of web workers.

View source

Made with love by Dario Kondratiuk