2010/6/14 Michael Ficarra <[email protected]>: > Well, it was specified beginning in JavaScript 1.5, and according to > http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(ECMAScript)#ECMAScript_version_support > most javascript engines support at least the 1.5 extensions. I would > also assume the number of engines that support the 1.5 extensions will > only grow.
Maybe browsers support other 1.5 features but this specific syntax is not supported on Chrome, Safari, or IE. I don't know about Opera. > On Jun 14, 7:43 pm, Mike Samuel <[email protected]> wrote: >> 2010/6/14 Michael Ficarra <[email protected]>: >> >> > Javascript (not ECMAScript) specifications allow for the use of >> > conditional catch statements of the form try { <statements> } catch( e >> > if <condition> ) { <statements> }. Currently, caja throws an error >> > stating that it was expecting a right parenthesis after the variable >> > in the catch clause, not the "if" that it found. Is this functionality >> > meant to be available to cajoled programs? In a cursory review, I >> > found no security risks associated with this construct nor any other >> > reasons not to include it. The official specification is located at >> >https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Statem... >> >> As far as I know, only Mozilla has implemented that. Is it used in >> any code outside >> Mozilla?http://www.google.com/codesearch?q=catch\s%2B\(\w%2B\s%2Bif suggests >> not.
