4 ms·
To those who say that creating a JavaScript 2.0 would break compatibility... couldn't you have a .js2 extension and compile a .js as a fallback. The newer brows
by adambrod 14y ago
To those who say that creating a JavaScript 2.0 would break compatibility... couldn't you have a .js2 extension and compile a .js as a fallback. The newer browser would ignore the fallback and use the js2. Thoughts??
Example:
<!-- JavaScript 2.0, unsupported browsers ignore -->
<script src="main.js2" fallback="main.js"></script>
<!-- Fallback compiled to current JavaScript -->
<script src="main.js"></script>