- From: Thomas Di Grégorio <notifications@github.com>
- Date: Tue, 07 Apr 2020 04:47:21 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 7 April 2020 11:47:35 UTC
What about JS files loaded/imported ? Have they to return the JS string or execute it? ```javascript fetch('/index.js').then( res=> res.text() ) ``` This is the same exactly as typing the URL in the adress bar, so what should do the browser? Execute the JS and get the result as text, or get the JS as text to be ( by ex. ) transpiled and executed manually? The problem of changing a spec is that it have to be retro-compatible with all the infinte already existing behaviors... A "gessing" algorythm to if the .js is to execute or not is waaaaaay more complicated as telling the browser explicitly to execute it by surrounding the JS by a `<script>[JS]</script>` ... So if you want to change world wide web behavior because you don't want to add this minimal 2 tags surrounding your JS, the simplicity principle will say that breaking X behaviors to add only 1 is worthless ... What you may not understand is that changing this behavior is changing it everywhere, not only for your use case (that is legit ! but in minority) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/807#issuecomment-610339848
Received on Tuesday, 7 April 2020 11:47:35 UTC