Skip to content

Commit 4be0cb9

Browse files
committed
fix: Move event listener to subject file
1 parent 80a116b commit 4be0cb9

File tree

2 files changed

+6
-7
lines changed
  • dev-packages/browser-integration-tests/suites/feedback/captureFeedbackCsp

2 files changed

+6
-7
lines changed

dev-packages/browser-integration-tests/suites/feedback/captureFeedbackCsp/init.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,3 @@ Sentry.init({
1010
feedbackIntegration({ tags: { from: 'integration init' }, styleNonce: 'foo1234', scriptNonce: 'foo1234' }),
1111
],
1212
});
13-
14-
document.addEventListener('securitypolicyviolation', () => {
15-
const container = document.querySelector('#csp-violation');
16-
if (container) {
17-
container.innerText = 'CSP Violation';
18-
}
19-
});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
document.addEventListener('securitypolicyviolation', () => {
2+
const container = document.querySelector('#csp-violation');
3+
if (container) {
4+
container.innerText = 'CSP Violation';
5+
}
6+
});

0 commit comments

Comments
 (0)