Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9131287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:07:07+00:00 2026-06-17T08:07:07+00:00

I see only one case where I should use window.setTimeout instead of setTimeout ,

  • 0

I see only one case where I should use window.setTimeout instead of setTimeout, it is when I have reused the name setTimeout in my closure, which is obviously not so good a practice (unless very specific use).

I noticed that Google Closure compiler does not remove window.. Since it is so aggressive in reducing variable names, I wondered if they have any reason for that?

Is there any other reason I am missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:07:08+00:00Added an answer on June 17, 2026 at 8:07 am

    If you use window.setTimeout, you’re sure to use window.setTimeout. That might not be a case if the setTimeout variable was shadowed in your scope.

    If you’re sure you didn’t shadow this variable, you might not bother, but the Closure compiler has no way to be sure, one of the reasons being that the context of a function can be provided dynamically.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Should a function have only one return statement? My teacher took points
When we have new in C#, that personally I see only as a workaround
When I create new Listcell( a) I can only see output as a instead
I'm trying to secure an application so that users can only see objects which
When I compile the following code, I only see the error during Run-time which
I've ran into a puzzling issue: I have only one method defined for inserting
I am looking forward for a messaging product which can fulfil following use case.
In PDC sessions i see only Framework 4.0, Azure and WPF. My all applications
Is DataContract attribute is deprecated in ASP.NET 4.0 WCF ? I can see only
I can only see inline CSS and JS while viewing the source code of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.