View Single Post
Old 07-15-2021, 06:09 PM   #7
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,875
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by KevinH View Post
Thinking about this, it would need to be more complex than linking in stylesheets.

It would only operate on script tags in head that have type text/javascript with a src attribute with a relative link.

It would *not* operate on:
- script tags in the body
- script tags that do not have javascript media types
- script tags that do not have src attributes.

And we would still have to figure out how to deal with "defer", "async" and origin attributes of the script tag which complicates things even more.

So if I do implement this, it would only work on a very restricted subset of vanilla cases.
Yes, the javascript world is huge. But if your implementation can write/erase in the SELECTED .xhtml files something like this:

Code:
<script src="../Misc/The_script_file.js" type="text/javascript"></script>
is ok to me. When the tags are written then the .js will be linked and when the tags are cleared, then the .js files will be unlinked.
RbnJrg is offline   Reply With Quote