We should use the violation element instead if not null. This is causing failures in imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/targeting.html but also time outs in other tests connecting the event listener to the target element.
Created attachment 444366 [details] WIP This is WIP for now because it won't apply, it applies on top of patch attached to bug #233037. Once that lands I'll include changelog and new test results.
Created attachment 444954 [details] Patch
<rdar://problem/85697149>
Comment on attachment 444954 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=444954&action=review > Source/WebCore/ChangeLog:15 > + (WebCore::Element::enqueueSecurityPolicyViolationEvent): Helper to queue ecuritypolicyviolationEvent for element. nit: ecuritypolicyviolationEvent > securitypolicyviolationEvent
Committed r286136 (244523@main): <https://commits.webkit.org/244523@main>