the thing is - there is a reason why strict mode is scope specific. I would
consider a global strict mode a bad habit, for 2 reasons:
1. As we use external code, we shouldn't assume the author used strict mode
for his code, and we might break it
2. Since strict mode is yet to be implemented properly on all major
browsers, you might miss this break if you check it on a non-strict browser

I always add strict mode to my code, but via a closure - that way I know my
code is fine and also I make sure not to pollute other code

that being said - I would trust that the Mootools devs know what they are
doing, and also that they check their test suits on a very large set of edge
cases..

On Fri, Feb 18, 2011 at 5:00 AM, nathanJsweet <[email protected]>wrote:

> So in the new ECMA standard the body decided that when the "this" word
> is used at the highest hierarchical level (i.e. when it would normally
> be the window object) would be undefined. In using the MooTools
> library I have noticed that they invoke all of their IIFEs by tying
> the variables to the "this" word instead of passing the window object
> to the function and tying the variables into the window object that
> way (as JQuery does). My question is: should I be worried? I'm tempted
> to go through MooTools when I'm finished building with it for a
> particular website and replace the cases where the "this" word is used
> for window with an invocation variable that is being passed the window
> object, like so: (function(w){ var someVar = w.someVar = function()
> {dosomething}})(window);. What do you all thing?
>
> --
> To view archived discussions from the original JSMentors Mailman list:
> http://www.mail-archive.com/[email protected]/
>
> To search via a non-Google archive, visit here:
> http://www.mail-archive.com/[email protected]/
>
> To unsubscribe from this group, send email to
> [email protected]
>



-- 
Arieh Glazer
אריה גלזר
052-5348-561
http://www.arieh.co.il
http://www.link-wd.co.il

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to