aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkzc <zaxxon2011@gmail.com>2016-06-30 00:24:34 -0400
committerRichard van Velzen <rvanvelzen1@gmail.com>2016-06-30 21:49:48 +0200
commit02c638209ee22816b1324ff0c0f47b27db1336af (patch)
treeab0477bc05a88c73e818b059c3c23baa34b48508 /lib
parent030611b729af46d2239bd09c95f88e708660f254 (diff)
downloadtracifyjs-02c638209ee22816b1324ff0c0f47b27db1336af.tar.gz
tracifyjs-02c638209ee22816b1324ff0c0f47b27db1336af.zip
Enable --screw-ie8 by default.
catch identifier is mangled correctly for ES5 standards-compliant JS engines by default. Unconditionally use the ie8 if/do-while workaround whether or not --screw-ie8 is enabled. To support non-standard ie8 javascript use: uglifyjs --support-ie8
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js2
-rw-r--r--lib/output.js6
-rw-r--r--lib/scope.js4
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 527b8e62..22d6bf17 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -72,7 +72,7 @@ function Compressor(options, false_by_default) {
pure_getters : false,
pure_funcs : null,
negate_iife : !false_by_default,
- screw_ie8 : false,
+ screw_ie8 : true,
drop_console : false,
angular : false,
warnings : true,
diff --git a/lib/output.js b/lib/output.js
index 5db1356c..324f96ed 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -64,7 +64,7 @@ function OutputStream(options) {
comments : false,
shebang : true,
preserve_line : false,
- screw_ie8 : false,
+ screw_ie8 : true,
preamble : null,
quote_style : 0,
keep_quoted_props: false
@@ -861,8 +861,8 @@ function OutputStream(options) {
// adds the block brackets if needed.
if (!self.body)
return output.force_semicolon();
- if (self.body instanceof AST_Do
- && !output.option("screw_ie8")) {
+ if (self.body instanceof AST_Do) {
+ // Unconditionally use the if/do-while workaround for all browsers.
// https://github.com/mishoo/UglifyJS/issues/#issue/57 IE
// croaks with "syntax error" on code like this: if (foo)
// do ... while(cond); else ... we need block brackets
diff --git a/lib/scope.js b/lib/scope.js
index d07eca12..7ae87072 100644
--- a/lib/scope.js
+++ b/lib/scope.js
@@ -88,7 +88,7 @@ SymbolDef.prototype = {
AST_Toplevel.DEFMETHOD("figure_out_scope", function(options){
options = defaults(options, {
- screw_ie8: false,
+ screw_ie8: true,
cache: null
});
@@ -377,7 +377,7 @@ AST_Toplevel.DEFMETHOD("_default_mangler_options", function(options){
eval : false,
sort : false, // Ignored. Flag retained for backwards compatibility.
toplevel : false,
- screw_ie8 : false,
+ screw_ie8 : true,
keep_fnames : false
});
});