Skip to content

Add disposition field to SecurityPolicyViolationEvent interface #1030

@bsafwen

Description

@bsafwen

lib Update Request

Configuration Check

My compilation target is ES2015 and my lib is ["esnext", "dom"].

Missing / Incorrect Definition

the interface SecurityPolicyViolationEvent is missing the disposition field.

Sample Code

private checkSecPolicyViolation(event: SecurityPolicyViolationEvent) {
    if (event.disposition === 'report') return "not important";
    else if (event.disposition === 'enforce') return "something needs to be done";
}

Documentation Link

According to https://www.w3.org/TR/CSP3/#violation-events, the interface SecurityPolicyViolationEvent has a field called disposition. This field is present in Chrome, Firefox, Safari.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions