Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make modal more CSP-friendly #1058

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bendemboski
Copy link

Description

Setting up mouseover and mouseout event listeners using the onmouseover and onmouseout attributes prevents turning off unsafe-inline in the page's content security policy. This commit changes the event listeners to use addEventListener instead.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project ( Run yarn lint to check)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • New and existing unit tests pass locally with my changes

How should be tested? (Manual or Automated Tests)

  • Manual tests: I have tested this changes manually.

Setting up `mouseover` and `mouseout` event listeners using the `onmouseover` and `onmouseout` attributes prevents turning off `unsafe-inline` in the page's content security policy. This commit changes the event listeners to use `addEventListener` instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant