jschementi / iron

[Jimmy Schementi's development fork] Implementations of Python and Ruby programming languages for .NET Framework that are built on top of the Dynamic Language Runtime.
http://ironruby.net
17 stars 2 forks source link

Script tag with mismatching mime-type/file-extension seems to work! #9

Open jschementi opened 15 years ago

jschementi commented 15 years ago

When a script tag has a mismatching mime-type/file-extension, preference is given to the file-extension. See Tests/tests.html

jschementi commented 15 years ago

This is not the case. Here is the line in question:

<script type="text/python" src="rblib/python.rb"></script>

Because external script-tags are not immediately run (defer defaults to true), the Python engine is loaded, the script is downloaded, but it is not run. Since it's already downloaded, another Ruby scrip can require it.

This leads me to believe that "defer=true" as default is wrong; it should stay as much like JavaScript as possible.