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: warnings #19

Merged
merged 8 commits into from
Dec 23, 2022
Merged

fix: warnings #19

merged 8 commits into from
Dec 23, 2022

Conversation

eugbyte
Copy link
Owner

@eugbyte eugbyte commented Dec 23, 2022

Getting the following warnings with firefox web extension linter:

DANGEROUS_EVAL          The Function constructor is eval.

UNSAFE_VAR_ASSIGNMENT   Unsafe assignment to innerHTML

DANGEROUS_EVAL

The reason for dangerous eval is due to the lodash library, which uses the following line:
const root = freeGlobalThis || freeGlobal || freeSelf || Function('return this')()

UNSAFE_VAR_ASSIGNMENT

The reason for unsafe var assignment is due to certain functions within the react library. The purpose of these functions appear to be to ensure cross browser compatibility. Below is a code snippet:

      // IE does not have innerHTML for SVG nodes, so instead we inject the
      // new markup in a temp node and then move the child nodes across into
      // the target node
      reusableSVGContainer = reusableSVGContainer || document.createElement('div');
      reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';

@eugbyte eugbyte merged commit bf6fbe1 into master Dec 23, 2022
@eugbyte eugbyte deleted the fix/warnings branch December 23, 2022 07:12
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