SecurityPolicyViolationEventInit Class
The initialization dictionary of a SecurityPolicyViolationEvent (https://w3c.github.io/webappsec-csp/#dictdef-securitypolicyviolationeventinit).
public sealed class SecurityPolicyViolationEventInit : EventInit- Inheritance
EventInitSecurityPolicyViolationEventInit
Constructors
| Name | Description |
|---|---|
| SecurityPolicyViolationEventInit() |
SecurityPolicyViolationEventInit()
SecurityPolicyViolationEvent.cspublic SecurityPolicyViolationEventInit()No documentation is available.
Properties
| Name | Description |
|---|---|
| BlockedUri | Gets the URL of the blocked resource, or a keyword (inline, eval...). |
| ColumnNumber | Gets the column of the script that caused the violation. |
| Disposition | Gets the disposition of the violated policy. |
| DocumentUri | Gets the URL of the document or worker whose policy is violated. |
| EffectiveDirective | Gets the name of the directive whose enforcement caused the violation. |
| LineNumber | Gets the line of the script that caused the violation. |
| OriginalPolicy | Gets the serialization of the violated policy. |
| Referrer | Gets the referrer of the document whose policy is violated. |
| Sample | Gets the sample of the code or the value that caused the violation. |
| SourceFile | Gets the URL of the script that caused the violation. |
| StatusCode | Gets the HTTP status code of the response of the document or worker whose policy is violated. |
| ViolatedDirective | Gets the name of the violated directive (a historical alias of SecurityPolicyViolationEventInit.EffectiveDirective). |
BlockedUri
SecurityPolicyViolationEvent.csGets the URL of the blocked resource, or a keyword (inline, eval...).
public string BlockedUri { get; init; }ColumnNumber
SecurityPolicyViolationEvent.csGets the column of the script that caused the violation.
public uint ColumnNumber { get; init; }Disposition
SecurityPolicyViolationEvent.csGets the disposition of the violated policy.
public SecurityPolicyViolationEventDisposition Disposition { get; init; }DocumentUri
SecurityPolicyViolationEvent.csGets the URL of the document or worker whose policy is violated.
public string DocumentUri { get; init; }EffectiveDirective
SecurityPolicyViolationEvent.csGets the name of the directive whose enforcement caused the violation.
public string EffectiveDirective { get; init; }LineNumber
SecurityPolicyViolationEvent.csGets the line of the script that caused the violation.
public uint LineNumber { get; init; }Property value
See also
OriginalPolicy
SecurityPolicyViolationEvent.csGets the serialization of the violated policy.
public string OriginalPolicy { get; init; }Referrer
SecurityPolicyViolationEvent.csGets the referrer of the document whose policy is violated.
public string Referrer { get; init; }Property value
See also
Gets the sample of the code or the value that caused the violation.
public string Sample { get; init; }Property value
See also
SourceFile
SecurityPolicyViolationEvent.csGets the URL of the script that caused the violation.
public string SourceFile { get; init; }StatusCode
SecurityPolicyViolationEvent.csGets the HTTP status code of the response of the document or worker whose policy is violated.
public ushort StatusCode { get; init; }ViolatedDirective
SecurityPolicyViolationEvent.csGets the name of the violated directive (a historical alias of SecurityPolicyViolationEventInit.EffectiveDirective).
public string ViolatedDirective { get; init; }