Die Funktionalität dieser Website ist durch Wartungsarbeiten eingeschränkt, die Ihr Erlebnis verbessern sollen. Wenn ein Artikel Ihr Problem nicht löst und Sie eine Frage stellen möchten, können Sie unsere Gemeinschaft über @FirefoxSupport auf Twitter, /r/firefox oder Reddit fragen.

Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

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?

Ausgewählte Lösung

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.

Diese Antwort im Kontext lesen 👍 0

Alle Antworten (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) <notify@twitter.com> Date: Mon, Sep 15, 2014 at 2:08 PM Subject: BrendanEich (@BrendanEich) mentioned you on Twitter! To: Owen Densmore <owen@backspaces.net>

@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

Ausgewählte Lösung

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.