Firefox Tomorrow

web api instance property

SecurityPolicyViolationEvent: lineNumber property

View on MDN ↗

Available in workers

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.

Value

A number representing the line number at which the violation occurred.

Examples

document.addEventListener("securitypolicyviolation", (e) => {
  console.log(e.lineNumber);
});

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also