if (COMPRESS) COMPRESS.global_defs = getOptions("d");
}
-if (ARGS.screw_ie8) {
- if (COMPRESS) COMPRESS.screw_ie8 = true;
- if (MANGLE) MANGLE.screw_ie8 = true;
-}
-
if (ARGS.r) {
if (MANGLE) MANGLE.except = ARGS.r.replace(/^\s+|\s+$/g).split(/\s*,+\s*/);
}
beautify: BEAUTIFY ? true : false
};
+if (ARGS.screw_ie8) {
+ if (COMPRESS) COMPRESS.screw_ie8 = true;
+ if (MANGLE) MANGLE.screw_ie8 = true;
+ OUTPUT_OPTIONS.screw_ie8 = true;
+}
+
if (BEAUTIFY)
UglifyJS.merge(OUTPUT_OPTIONS, BEAUTIFY);
var prop = self.property;
if (prop instanceof AST_String && compressor.option("properties")) {
prop = prop.getValue();
- if ((compressor.option("screw_ie8") && RESERVED_WORDS(prop))
- || (!(RESERVED_WORDS(prop)) && is_identifier_string(prop))) {
+ if (RESERVED_WORDS(prop) ? compressor.option("screw_ie8") : is_identifier_string(prop)) {
return make_node(AST_Dot, self, {
expression : self.expression,
property : prop
inline_script : false,
width : 80,
max_line_len : 32000,
- ie_proof : true,
beautify : false,
source_map : null,
bracketize : false,
semicolons : true,
comments : false,
preserve_line : false,
+ screw_ie8 : false,
negate_iife : !(options && options.beautify),
}, true);
if (!self.body)
return output.force_semicolon();
if (self.body instanceof AST_Do
- && output.option("ie_proof")) {
+ && !output.option("screw_ie8")) {
// 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
&& +key + "" == key)
&& parseFloat(key) >= 0) {
output.print(make_num(key));
- } else if (!is_identifier(key)) {
- output.print_string(key);
- } else {
+ } else if (RESERVED_WORDS(key) ? output.option("screw_ie8") : is_identifier_string(key)) {
output.print_name(key);
+ } else {
+ output.print_string(key);
}
output.colon();
self.value.print(output);