Microsoft Ajax Minifier 4.82

Rating: No reviews yet
Downloads: 140
Change Set: 98159
Released: Feb 5, 2013
Updated: Feb 5, 2013 by ronlo
Dev status: Stable Help Icon

Downloads

Application AjaxMin 4.82
application, 732K, uploaded Feb 5, 2013 - 140 downloads

Release Notes

Fixing a bug around invalid JS (for the current ES5 specs): function declarations at other than source-element scopes. Technically it's invalid to put a function declaration within, say, an if-block; but browsers allow it -- unfortunately they treat them differently since it's not a spec'd scenario. Some declare the name immediately as if it were at the source element level; some don't declare the name until the declaration is "executed." The difference could lead to hard-to-debug cross-browser issues.

AjaxMin was updated a while back to support the upcoming ES6 spec, which calls for block-level scoping of lexical elements, including function declarations. So it will be perfectly valid to declare a function within an if-statement -- but the declaration will only be scoped to that block and not visible outside it. The end result is that if someone writes some JavaScript to the current browsers thinking their function declaration will be scoped to the variable scope, AjaxMin will break that code upon minification by renaming it to something that doesn't collide within the lexical scope -- but might collide in the variable scope, clobbering values.
Updated AjaxMin such that it maintains a linkage to the variable scope so the lexical function declaration won't collide with another variable-scope field during renaming. Also added a low-sev warning about the situation, since most people aren't coding ES6 yet anyway. Will have to revisit later; maybe add a JS version switch for ES5 vs ES6.

Reviews for this release

No reviews yet for this release.