Closed alex-ketch closed 4 years ago
@numical
"test" attribute gives us a power to select whatever file we want, so basically current implementation supports mimetypes other than script. Only thing we need to do, dynamically fill "as" attribute.
Here is very basic implementation, not perfect, but could help lots of people with very little effort.
Hello - I'm sorry to say that this plugin is no longer being maintained. I have tried to close all issues ahead of doing this but instead have found that the issue list just keeps growing. I simply do not have the time to keep up. Sorry. Please keep an eye on the README where I will record anyone who forks this repo with the intention to supporting it in the future.
Hi there, and thanks for this plugin, it's come in very handy for setting custom attributes on injected chunks.
A use case I've come across is needing to set attributes on stylesheet links, however due to this line of code checking whether the link tag has a
as="script"
attribute, stylesheet link tags (<link rel="stylesheet" …
) are skipped.Right now I've solved our problem in a fork with a rudimentary change, but I was wondering if this was something that was in scope for this plugin, and if a PR for this functionality would be wanted.
Also, if there's a better plugin for achieving this please let me know.