7155f169b1
dart2js and ddc both have a rich enough JS AST to use dot or bracket notation when necessary. Therefore, both compilers have and do support @JS renames that contain characters that aren't supported in dot notation e.g. `my-lib`. We should have dart2wasm also support such characters to be consistent, but prefer dot notation and avoid adding extra `globalThis` when possible. Change-Id: Iabf4d6f88dd23321388841f3a6b64758f856c68f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447964 Reviewed-by: Ömer Ağacan <omersa@google.com> Commit-Queue: Srujan Gaddam <srujzs@google.com>