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

Warnings from firefox web-ext linter #20

Open
eugbyte opened this issue Dec 23, 2022 · 0 comments
Open

Warnings from firefox web-ext linter #20

eugbyte opened this issue Dec 23, 2022 · 0 comments

Comments

@eugbyte
Copy link
Owner

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>';
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

No branches or pull requests

1 participant