Update files to not throw an error in "use strict" mode. #2379#2380
Update files to not throw an error in "use strict" mode. #2379#2380GCheung55 wants to merge 2 commits intomootools:masterfrom
Conversation
|
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. |
|
@arian please add details |
|
i like it. |
|
@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? |
|
iirc the problem was that the file-scope this isn't always the global context. |
…expected in node env for mootools#2380
@arian and @kentaromiura, check it out?