Skip to content

fix: warnings#19

Merged
eugbyte merged 8 commits intomasterfrom
fix/warnings
Dec 23, 2022
Merged

fix: warnings#19
eugbyte merged 8 commits intomasterfrom
fix/warnings

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