SecurityPolicyViolationEvent

open class SecurityPolicyViolationEvent(    val type: EventType<SecurityPolicyViolationEvent>,     init: SecurityPolicyViolationEventInit = definedExternally) : Event(source)

The SecurityPolicyViolationEvent interface inherits from Event, and represents the event object of a securitypolicyviolation event sent on an Element/securitypolicyviolation_event, Document/securitypolicyviolation_event, or WorkerGlobalScope/securitypolicyviolation_event when its Content Security Policy (CSP) is violated.

MDN Reference

Constructors

Link copied to clipboard
constructor(type: EventType<SecurityPolicyViolationEvent>, init: SecurityPolicyViolationEventInit = definedExternally)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

The blockedURI read-only property of the SecurityPolicyViolationEvent interface is a string representing the URI of the resource that was blocked because it violates a Content Security Policy (CSP).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The columnNumber read-only property of the SecurityPolicyViolationEvent interface is the column number in the document or worker script at which the Content Security Policy (CSP) violation occurred.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The disposition read-only property of the SecurityPolicyViolationEvent interface indicates how the violated Content Security Policy (CSP) is configured to be treated by the user agent.

Link copied to clipboard

The documentURI read-only property of the SecurityPolicyViolationEvent interface is a string representing the URI of the document or worker in which the Content Security Policy (CSP) violation occurred.

Link copied to clipboard

The effectiveDirective read-only property of the SecurityPolicyViolationEvent interface is a string representing the Content Security Policy (CSP) directive that was violated.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The lineNumber read-only property of the SecurityPolicyViolationEvent interface is the line number in the document or worker script at which the Content Security Policy (CSP) violation occurred.

Link copied to clipboard
Link copied to clipboard

The originalPolicy read-only property of the SecurityPolicyViolationEvent interface is a string containing the Content Security Policy (CSP) whose enforcement uncovered the violation.

Link copied to clipboard

The referrer read-only property of the SecurityPolicyViolationEvent interface is a string representing the referrer for the resources whose Content Security Policy (CSP) was violated.

Link copied to clipboard

The sample read-only property of the SecurityPolicyViolationEvent interface is a string representing a sample of the resource that caused the Content Security Policy (CSP) violation.

Link copied to clipboard

The sourceFile read-only property of the SecurityPolicyViolationEvent interface is a string representing the URL of the script in which the Content Security Policy (CSP) violation occurred.

Link copied to clipboard

The statusCode read-only property of the SecurityPolicyViolationEvent interface is a number representing the HTTP status code of the window or worker in which the Content Security Policy (CSP) violation occurred.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The violatedDirective read-only property of the SecurityPolicyViolationEvent interface is a string representing the Content Security Policy (CSP) directive that was violated.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard