Error in document.getElementById () in Brackets [closed]

0

You're giving this error in the image when I use "document". Does anybody know how to solve this? I already searched the stack right here and found nothing that would help me. Detail, I'm using the Brackets.

    
asked by anonymous 25.11.2017 / 02:59

1 answer

4

This warning is from the program that checks the syntax of the code, one of the most popular (and maybe what you have) is the ESLint.

This error should be ignored if this code is to run in the browser, since document is a global one in the browser.

To fix this, go to the ESLint configuration file and join

env: {
    browser: true,

to tell linter that this code runs in the browser

    
25.11.2017 / 08:57