当我在http://closure-compiler.appspot.com的闭包编译器中测试以下代码时:
// ==ClosureCompiler==
// @output_file_name default.js
// @compilation_level ADVANCED_OPTIMIZATIONS
// @formatting pretty_print
// ==/ClosureCompiler==
// These get renamed
window.foo = {};
window.bar = {};
// These don't
window.uid = {};
window.test = {};
输出是:
window.a = {};
window.b = {};
window.uid = {};
window.test = {};
为什么要重命名:
window.foo = {};
window.bar = {};
但不是:
window.uid = {};
window.test = {};
这似乎是某些词的问题?