Freecodecamp: Const can't be redeclared in challenges

Created on 23 Jan 2017  路  11Comments  路  Source: freeCodeCamp/freeCodeCamp

on the roadmap

Most helpful comment

Still having this issue :(

All 11 comments

Why are we blocked on this?

@raisedadead I talked with @BerkeleyTrue about this a few days ago and he said could tackle it himself, and we set it to blocked.

@QuincyLarson @BerkeleyTrue Can we get an update on this?

Updates will be posted here.

Possible solution to this are:

Wrap user code in an anon function. const are block scoped so wrapping them a function prevents them from polluting the namespace of the iframe.

Pass the user code through babel so that the const's are transpiled to var's. We currently do this user code but not for script tags in html from the users input.

Those are two approaches, right? Which one would you prefer to take?

@ZZhaoTireless The second one would be best of the two

Hey @BerkeleyTrue. Is there anything we can do to help?

This issue seems to still be around, is anyone working on this currently?

Still having this issue :(

iframes are now immutable

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robwelan picture robwelan  路  3Comments

kokushozero picture kokushozero  路  3Comments

danielonodje picture danielonodje  路  3Comments

Tzahile picture Tzahile  路  3Comments

imhuyqn picture imhuyqn  路  3Comments