Re: Expanded function syntax

2008-02-05 Thread Jason Orendorff
On Jan 31, 2008 5:08 PM, Mark Filipak [EMAIL PROTECTED] wrote: What I have to write now: getFirstChildOfElementWithTagName(Papa, 'baby'); If you're not writing something like $(baby:first, Papa), you're missing out on what the language already has to offer. -j

Function inside if statement?

2008-02-05 Thread Garrett Smith
if(a) { function b(){ } } A block can contain statements. A statement can't start with the function keyword. Mozilla's Core JavaScript guide explains that of |b| should be evaluated as a functionExpression, but this isn't right. Source:

Re: Function inside if statement?

2008-02-05 Thread Brendan Eich
On Feb 5, 2008, at 3:45 PM, Garrett Smith wrote: if(a) { function b(){ } } A block can contain statements. A statement can't start with the function keyword. Mozilla's Core JavaScript guide explains that of |b| should be evaluated as a functionExpression, but this isn't right. Source:

Re: Function inside if statement?

2008-02-05 Thread liorean
Just wanted to point out the thread starting here: uri:https://mail.mozilla.org/pipermail/es4-discuss/2007-March/000483.html. It discusses this issue. Brendan gave this answer, a few replies in: Since this is an ES3 extension, allowed by chapter 16, we could codify the majority-share practice,