SecurityPolicyViolationEventInit Class

The initialization dictionary of a SecurityPolicyViolationEvent (https://w3c.github.io/webappsec-csp/#dictdef-securitypolicyviolationeventinit).

public sealed class SecurityPolicyViolationEventInit : EventInit
Inheritance
EventInit SecurityPolicyViolationEventInit

Constructors

NameDescription
SecurityPolicyViolationEventInit()

SecurityPolicyViolationEventInit()

SecurityPolicyViolationEvent.cs
public SecurityPolicyViolationEventInit()

No documentation is available.

Properties

NameDescription
BlockedUriGets the URL of the blocked resource, or a keyword (inline, eval...).
ColumnNumberGets the column of the script that caused the violation.
DispositionGets the disposition of the violated policy.
DocumentUriGets the URL of the document or worker whose policy is violated.
EffectiveDirectiveGets the name of the directive whose enforcement caused the violation.
LineNumberGets the line of the script that caused the violation.
OriginalPolicyGets the serialization of the violated policy.
ReferrerGets the referrer of the document whose policy is violated.
SampleGets the sample of the code or the value that caused the violation.
SourceFileGets the URL of the script that caused the violation.
StatusCodeGets the HTTP status code of the response of the document or worker whose policy is violated.
ViolatedDirectiveGets the name of the violated directive (a historical alias of SecurityPolicyViolationEventInit.EffectiveDirective).

Gets the URL of the blocked resource, or a keyword (inline, eval...).

public string BlockedUri { get; init; }

Gets the column of the script that caused the violation.

public uint ColumnNumber { get; init; }

Gets the URL of the document or worker whose policy is violated.

public string DocumentUri { get; init; }

Gets the name of the directive whose enforcement caused the violation.

public string EffectiveDirective { get; init; }

Gets the line of the script that caused the violation.

public uint LineNumber { get; init; }

Gets the serialization of the violated policy.

public string OriginalPolicy { get; init; }

Gets the referrer of the document whose policy is violated.

public string Referrer { get; init; }

Gets the sample of the code or the value that caused the violation.

public string Sample { get; init; }

Gets the URL of the script that caused the violation.

public string SourceFile { get; init; }

Gets the HTTP status code of the response of the document or worker whose policy is violated.

public ushort StatusCode { get; init; }

Gets the name of the violated directive (a historical alias of SecurityPolicyViolationEventInit.EffectiveDirective).

public string ViolatedDirective { get; init; }