How use es6 features in FF
Using Traceur, we run in dynamic mode where Traceur compiles in place. We do this so that we can set the Traceur options to defer to the browser's es6 features if they are there. (All polyfill defer automatically do this, the options are used for compilation of new syntax).
Our testing reveled that FF apparently requires an old, deprecated <script type,="" <pre=""> <script type="application/javascript;version=1.7">/* Code... */</script> </pre> <p>see this post: <pre> http://gu.illau.me/posts/cross-browser-generator-functions/ </pre> <p>Our code is cross browser, thus would like to have Traceur or native es6 features in the same way on Chrome, FF, Safari, mobile and so on. </p><p>How would I do this, given the apparently incompatible <script> usage by FF? </p></script>
Chosen solution
Okay. Assuming it tests out, that will put it in Firefox 35. If you don't notice anyone mentioning uplifting the patch to Aurora (future Firefox 34) or Beta (future Firefox 33) after the change is committed, you can request that in the bug. This doesn't always happen for Beta due to the risk of breaking other things, but sometimes it does.
Read this answer in context 👍 0All Replies (3)
That article describes a workaround for Firefox 25 and earlier. What problem do you see in Firefox 31 and newer? Can you give a link to a page online demonstrating the problem?
Hi! I tweeted this problem, and Brendan Eich responded, .. after several tweets its now assigned to the bug database and soon to be fixed, see below.
I can put up a page if you need it but if not, we'll presume this is handled.
Forwarded message ----------
From: BrendanEich (via Twitter) <[email protected]> Date: Mon, Sep 15, 2014 at 2:08 PM Subject: BrendanEich (@BrendanEich) mentioned you on Twitter! To: Owen Densmore <[email protected]>
@jorendorff Wow, big set of patches. Thanks to everyone involved. @backspaces - @BrendanEich
@BrendanEich Is it really true FF es6 scripts need type=application/javascript;version=1.7 thus incompat. w/ Chrome? gu.illau.me/posts/cross-br… - 15 Sep
Jason Orendorff @jorendorff @BrendanEich @backspaces Agreed. (We are implementing: bugzil.la/1001090 gets us much closer and should land today.) - 15 Sep
@BrendanEich @jorendorff Wow, big set of patches. Thanks to everyone involved. @backspaces
Chosen Solution
Okay. Assuming it tests out, that will put it in Firefox 35. If you don't notice anyone mentioning uplifting the patch to Aurora (future Firefox 34) or Beta (future Firefox 33) after the change is committed, you can request that in the bug. This doesn't always happen for Beta due to the risk of breaking other things, but sometimes it does.