Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Hierdie gesprek is in die argief. Vra asseblief 'n nuwe vraag as jy hulp nodig het.

How use es6 features in FF

more options

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>

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, <script type="application/javascript;version=1.7">/* Code... */</script> see this post: http://gu.illau.me/posts/cross-browser-generator-functions/ 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. How would I do this, given the apparently incompatible <script> usage by FF?

Gekose oplossing

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.

Lees dié antwoord in konteks 👍 0

All Replies (3)

more options

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?

more options

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

more options

Gekose oplossing

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.