If someone wants to put a module on CDNJS, then currently when clicking "Copy script tag" it turns out something like this:
<script src="https://cdnjs_url_here"></script>
what if in the json files describing the file, we could also add other attributes, e.g.
//Other JSON stuff here
"filemap": [
{
//I forgot how the proper way is to add files to CDNJS that should be tracked, sorry!
// normal stuff here, like file location and stuff
"attributes": {
"type": "module",
"async": "true",
"defer": "true",
}
}
]
//More JSON stuff
Now clicking "copy script tag" would do this for the file in question:
<script src="https://cdnjs_url_here" async defer type="module"></script>
(oh, and of course only certain attributes would be whitelisted, so that people can't do onerror, or onload)
If someone wants to put a module on CDNJS, then currently when clicking "Copy script tag" it turns out something like this:
what if in the json files describing the file, we could also add other attributes, e.g.
Now clicking "copy script tag" would do this for the file in question:
(oh, and of course only certain attributes would be whitelisted, so that people can't do onerror, or onload)