Closed
Description
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.