Extension
Namespace: PuppeteerSharp
public abstract class ExtensionRepresents an Extension instance installed in the browser.
Inheritance: object
<p>This API is experimental.</p>
Constructors
Section titled “Constructors”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. |
Properties
Section titled “Properties”Enabled
Section titled “Enabled”public bool Enabled { get; }Gets a value indicating whether the extension is enabled.
Value: bool
public string Id { get; }Gets the ID of the extension.
Value: string
public string Name { get; }Gets the name of the extension.
Value: string
public string Path { get; }Gets the path in the file system where the extension is located.
Value: string
Version
Section titled “Version”public string Version { get; }Gets the version of the extension.
Value: string
Methods
Section titled “Methods”PagesAsync()
Section titled “PagesAsync()”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.
TriggerActionAsync(IPage)
Section titled “TriggerActionAsync(IPage)”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.
WorkersAsync()
Section titled “WorkersAsync()”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.
Made with love by Dario Kondratiuk