htmlbars
htmlbars copied to clipboard
Syntax Error in Android Browser API Level <= 15
Admittedly this is an older browser, affecting as of this writing 8% of the Android market, but I thought I'd submit this for the record:
- open an HTMLBars-dependent client app (eg. an Ember CLI >= 1.13 app) in an Android browser running API level 15 or below (aka Ice Cream Sandwich, v4.0.4) - including an emulator
result: JavaScript syntax error: "Unexpected strict mode reserved word"
The web app fails to continue to load and will not run, thus making it unusable for users of devices at this API level.
Tracked the offending line down to: https://github.com/tildeio/htmlbars/blob/0d883d7dba4e4e7dc476dd7b46a45781a05b6665/packages/htmlbars-runtime/lib/hooks.js#L107
Related issue: https://github.com/cujojs/when/issues/89
Does not repro on Android browsers >= API level 16.
Would you mind sending in a PR quoting 'yield'?
Done. Hopefully uglifiers won't strip the quotes...
Shouldn't babel be handling this?
I can confirm that this change does indeed fix this issue.
But it does seem like a nice-to-have for the Babel processor.