javascript - Why do options["foo"] || options.foo? -
Reading through knockout.js source code I came to
settlement when option = option ["when disposed"] || | Options.disposeWhen I have never seen it before and whatever I know about Javascript says that there is no case when || Both sides of the will be different. Why could the knockout team have used this build?
This symbol comes as a result of matching the closing compiler:
Closure compiler compilation does not change the string literals in your code anytime, regardless of which compilation you use, it means that the compilation properties with ADVANCED_OPTIMIZATIONS behave differently, depending on whether your code stringes them Or does not access it. If you combine string contexts for the property with dot-syntax references, the closure compiler changes the name of some references to that property but not the other. As a result, your code probably will not go right.
The literal use of both dot syntax and string is the "safe" way to work around it, because it ensures that using a customer is an unused part of the API but its code But there will be no problem on not using the compiler to close.
Comments
Post a Comment