Community Member Profile
- Profile: /members/5920-Brian-Arnold.htm
- URL: http://www.randomthink.net/
- Comments: 8
- Points: 84
Recent Blog Comments By Brian Arnold
-
Using Composed Javascript UI Controllers With Event Delegation
Posted on Oct 14, 2010 at 7:25 PM
Given that you're talking about performance issues, one thing you could do to optimize a bit: var controller = $( this ).data( "controller" ); That line is creating a jQuery object that gets used one time. That's all well and good, but if a... read more »
-
Using Named Functions Within Self-Executing Function Blocks In Javascript
Posted on Aug 16, 2010 at 9:48 AM
Erm - I didn't actually link in the gist. http://gist.github.com/360138 There we go. Sorry about that.... read more »
-
Using Named Functions Within Self-Executing Function Blocks In Javascript
Posted on Aug 16, 2010 at 9:48 AM
This approach is pretty great - I'm a fan. I picked it up from this gist from Ben Alman (which itself was forked from a gist from Remy Sharp), which shows some other ways to use this technique (such as waiting before the first execution or using setInterval instead of setTimeout). Als... read more »
-
Using The WITH Keyword With Javascript's Function() Constructor
Posted on May 20, 2010 at 10:04 AM
If you look into the interiors of some of the templating stuff out there (I believe I saw it in jQuery.tmpl and I know Underscore.js does it), they do something very similar with `with` to get the templating to work. read more »
-
Javascript Function() Constructor Does Not Create A Closure
Posted on May 6, 2010 at 9:48 PM
@Ben, You can eval huge chunks of logic. http://blog.sproutcore.com/post/225219087/faster-loading-through-eval I just started listening to The Dev Show on 5by5.tv ( read more »
-
Javascript Function() Constructor Does Not Create A Closure
Posted on Apr 28, 2010 at 11:50 AM
@Ben, I should have watched the video. I was waking up and trying to be quiet or might have otherwise. :D Also, I decided to go reading, and on page 117 of the ECMAScript language spec I dug up (well, page 127 of the PDF but it's numbered 117), it explicitly says that when using the... read more »
-
Javascript Function() Constructor Does Not Create A Closure
Posted on Apr 28, 2010 at 8:57 AM
Posted a bit prematurely: I realize you're aware that the non-quoted syntax works fine, but guess there's likely a reason for trying to use the new Function syntax that I'm not aware of. :D... read more »
-
Javascript Function() Constructor Does Not Create A Closure
Posted on Apr 28, 2010 at 8:54 AM
I'm not sure if I've really seen functions created like that. If you tweak the interior to something like: var testScope = function() { console.log( scope ); }; Then it outputs 'function' instead of 'window'. Definitely seems like something about going the new... read more »



