GlobalPrivacyControlOptions Class

The preference of the user expressed by Global Privacy Control (https://w3c.github.io/gpc/, see BrowsingContextOptions.GlobalPrivacyControl): when it is enabled, navigator.globalPrivacyControl is true and the requests have the Sec-GPC: 1 header.

public sealed class GlobalPrivacyControlOptions

Constructors

NameDescription
GlobalPrivacyControlOptions()

GlobalPrivacyControlOptions()

public GlobalPrivacyControlOptions()

No documentation is available.

Properties

NameDescription
EnabledGets or sets whether the user does not consent to the sale or sharing of their data. The default is false.
IsEnabledGets or sets a callback that returns the preference of the user, read at each request and each read of navigator.globalPrivacyControl (e.g. a setting that the user can change). When set, it replaces GlobalPrivacyControlOptions.Enabled. The default is null.

Gets or sets whether the user does not consent to the sale or sharing of their data. The default is false.

public bool Enabled { get; init; }

Property value

bool

Gets or sets a callback that returns the preference of the user, read at each request and each read of navigator.globalPrivacyControl (e.g. a setting that the user can change). When set, it replaces GlobalPrivacyControlOptions.Enabled. The default is null.

public Func<CallbackContext, bool>? IsEnabled { get; init; }