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.
|