Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Remove unneeded window reference #15610

Closed
wants to merge 2 commits into from
Closed

Conversation

david-mark
Copy link

The document object is global.

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change?

Please check if the PR fulfills these requirements

Other information:

The document object is global.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

Can't rely on UA sniffing and certainly not in a unit test. Must fix the related code in AngularJS, rather than just skipping over the test based on the UA string.
@david-mark
Copy link
Author

I signed the CLA.

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

@david-mark
Copy link
Author

david-mark commented Jan 17, 2017

Also, the global document identifier needs to be added to here to appease ESLint:
https://github.com/angular/angular.js/blob/07849779ba365f371a8caa3b58e23f677cfdc5ad/.eslintrc-browser.json

For some reason I don't see that file in my fork (at least not on GitHub). (?)

@gkalpak
Copy link
Member

gkalpak commented Jan 17, 2017

The document object is global.

Depends on the environment 😃

This was deliberately added in #14345, in order to prevent a certain type of issues or make some usecases easier (see #14345 for more info).

@david-mark
Copy link
Author

Couldn't imagine using AngularJS in Node (e.g. with jsdom), but apparently some can. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants