Add a way to automatically get script license and unminified code (if available) #10158
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
What problem are you trying to solve?
There are some use cases that require getting the license of a script and/or its unminified version. However, AFAIK there are no ways to do this in the standard.
What solutions exist today?
There's a browser extension that uses several ways to get the license, such as searching for a link marked in a certain way and checking the table it links to. (I don't know if there are any other existing uses, but I can think of some potential ones.) However, many websites don't have the data it looks for.
How would you solve it?
I would add two attributes to the
<script>
tag. For the first one, I have two options. One ismin
with a URL to the minified script. If it exists or the body isn't empty,src
shouldn't be loaded. This option wouldn't be exactly backwards compatible. The other option issource
with a URL to the unminified version. I think the second option is better, but I've decided to leave the first one, too. The other new attribute should belicense
or a shortened version thereof. It should contain an identifier of the license(s). There should be built-in ones (probably from Nixpkgs), and it should be possible to define custom ones. It should be set up in a way that specifying a license counts as releasing the script under that license. HTML validators should give errors when a script tag is missinglicense
or the license requiressource
to be present, but it isn't. An example of a script tag with these attributes is<script src="pwa.min.js" source="pwa.js" license="gpl3plus"/>
. (It's how it would be for my WIP game, Paul's Weird Adventure. I didn't know about progressive web apps, Paul's Miraculous Adventure, or Pepe and Paul's weird adventure with Meliodas, Zeldris, and Estarossa when choosing the name.)Anything else?
No response
The text was updated successfully, but these errors were encountered: