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

Comments

@lukasoppermann
Copy link
Contributor

commented Jan 12, 2017

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

This comment has been minimized.

Copy link
Member

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 Jan 13, 2017

@feross

This comment has been minimized.

Copy link
Member

commented Jan 13, 2017

Also, this is a dupe of #672

@lukasoppermann

This comment has been minimized.

Copy link
Contributor Author

commented Jan 13, 2017

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

@feross

This comment has been minimized.

Copy link
Member

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.
2 participants
You can’t perform that action at this time.