|
|
|
|
|
by alexkavon
3801 days ago
|
|
A script type could work too. Either way, there would be some indicator of how the JS VM could parse the code. It's true you could get other languages into HTML this way as well, but the trick is that the browser needs to support the VM, which can be done natively or through a browser plugin/extension. Google tried this for a Dart VM (sidenote: there is no TypeScript VM from Microsoft that I'm aware of) into Chrome but discussions led away from that idea, and now Dart compiles to JS instead. A <meta> tag in <head> would eliminate <script type="application/sjavascript"></script>, <script type="application/sjavascript"></script>, etc. Though providing an either/or situation would be optimal too to allow a mixed script types for older libraries. |
|