w3c / webappsec-permissions-policy

A mechanism to selectively enable and disable browser features and APIs
https://w3c.github.io/webappsec-permissions-policy/
Other
399 stars 155 forks source link

PermissionsPolicyViolationReportBody is missing a toJSON operation #469

Closed foolip closed 5 months ago

foolip commented 2 years ago

The PermissionsPolicyViolationReportBody interface needs a [Default] object toJSON() operation, like other interfaces inheriting from ReportBody:

https://wicg.github.io/crash-reporting/#dom-crashreportbody-tojson https://wicg.github.io/deprecation-reporting/#dom-deprecationreportbody-tojson https://wicg.github.io/intervention-reporting/#dom-interventionreportbody-tojson

The implementation in Chromium already has this: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/permissions_policy_violation_report_body.idl;l=16;drc=02c99b55336ae75e06fb313457cc13e545fa95f0

This is like https://github.com/w3c/webappsec-csp/issues/546 but for another interface.