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

Update files to not throw an error in "use strict" mode. #2379 #2380

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

GCheung55
Copy link
Contributor

@arian and @kentaromiura, check it out?

@arian
Copy link
Member

arian commented Jul 11, 2012

It was like this before, but it was also reverted: GCheung55@8521f484f

I think that Cajon (https://github.com/requirejs/cajon) shouldn't just throw out "use strict"s outside some function scope, which it does if I understand you correctly.

@kentaromiura
Copy link
Member

@arian please add details
:trollface:

@DimitarChristoff
Copy link
Member

i like it.

@GCheung55
Copy link
Contributor Author

@arian Right. I think it shouldn't be aggressively enforcing 'use strict' either. But there will be cases like this, where a concat'd file has 'use strict' somewhere at the top.. and issues will occur.

The more interesting thing is that 'use strict' is inside cajon's function block scope. It shouldn't affect eval's scope.. should it?

@cpojer Could you comment why adding .call(this) was reverted? What would be a better fix?

@cpojer
Copy link
Member

cpojer commented Jul 11, 2012

iirc the problem was that the file-scope this isn't always the global context.

@SergioCrisostomo SergioCrisostomo modified the milestones: 1.5.1, 1.6.0 May 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants