Skip to content

EnableExtensionsOption

Namespace: PuppeteerSharp

public class EnableExtensionsOption

Represents the value for the EnableExtensions launch option. Can be implicitly converted from a bool or a string array.

Inheritance: object

View source

public EnableExtensionsOption(bool enabled)

Initializes a new instance of the EnableExtensionsOption class with a boolean value.

Parameters

Name Type Description
enabled bool Whether extensions are enabled.

View source

public EnableExtensionsOption(string[] paths)

Initializes a new instance of the EnableExtensionsOption class with an array of extension paths.

Parameters

Name Type Description
paths string[] The paths to unpacked extensions to load.

View source

public bool Enabled { get; }

Gets a value indicating whether extensions should be enabled.

Value: bool

View source

public string[] Paths { get; }

Gets the paths to unpacked extensions to load. When null, no specific extensions are loaded, but extensions may still be enabled if Enabled is true.

Value: string[]

View source

implicit operator EnableExtensionsOption(bool)

Section titled “implicit operator EnableExtensionsOption(bool)”
public static implicit operator EnableExtensionsOption(bool enabled)

Implicitly converts a bool to an EnableExtensionsOption.

Parameters

Name Type Description
enabled bool The boolean value.

Returns: EnableExtensionsOption

View source

implicit operator EnableExtensionsOption(string[])

Section titled “implicit operator EnableExtensionsOption(string[])”
public static implicit operator EnableExtensionsOption(string[] paths)

Implicitly converts a string array to an EnableExtensionsOption.

Parameters

Name Type Description
paths string[] The array of extension paths.

Returns: EnableExtensionsOption

View source

Made with love by Dario Kondratiuk