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

Errors for 'HTMLFormElement' is not defined and similar #745

Closed
lukasoppermann opened this issue Jan 12, 2017 · 4 comments
Closed

Errors for 'HTMLFormElement' is not defined and similar #745

lukasoppermann opened this issue Jan 12, 2017 · 4 comments

Comments

@lukasoppermann
Copy link
Contributor

Hey, standard yells at me:

   20:31  error  'HTMLFormElement' is not defined
   22:31  error  'HTMLBodyElement' is not defined
  116:1   error  'ShadyCSS' is not defined
  120:30  error  'HTMLElement' is not defined
  126:5   error  'ShadyCSS' is not defined
  263:1   error  'customElements' is not defined

ShadyCSS makes sense, but the rest should be fine. Is this something to do with #46?

@feross
Copy link
Member

feross commented Jan 13, 2017

You have three options.

  1. Explicitly get the variable from the global window object, for example: window.HTMLFormElement. (standard only exposes window, document, and navigator globals in the browser.)

  2. Whitelist the globals with a comment at the top of the file: /* global HTMLFormElement */

  3. Whitelist all browser globals with a comment at the top of the file: /* eslint-env browser */

@feross feross closed this as completed Jan 13, 2017
@feross
Copy link
Member

feross commented Jan 13, 2017

Also, this is a dupe of #672

@lukasoppermann
Copy link
Contributor Author

Ahh, thanks. Sorry I searched but did not find the other issue.

@feross
Copy link
Member

feross commented Jan 13, 2017

No problem 👍

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants