Risking a wontfix here if this is considered out of the module's scope, but...

It would be really great if there was a way to add tests through the UI and be able to associate each test with a yes/nope field to define file path(s) of polyfills to be loaded. Think of this like the #1278504: Call Modernizr.load() from theme .info files feature introduced in 7.x-3.x.

I don't know if CSS Injector & JS Injector offer some API we could take advantage of in this, but it would be great if these modules worked in harmony. If this is possible, instead of providing fields for file paths to be defined, we could be providing drop-down menus prefiled with css/js profiles created by these modules.

Alternatively, -and provided this is considered an idea worth pursuing- we do this the other way around: we could file separate issues in these modules' queues to add Modernizr support in a manner that would allow each css/js loading rule to be first validated by a modernizr test.

Thank you in advance for considering this one.

Comments

rupl’s picture

Good suggestion; certainly not a wontfix! If people desire this functionality I'm all for it. At the moment I'm trying to focus on the underlying API, so maybe we can make this happen for a minor release after we hash out the API issues for 3.0 stable. Or if you can't wait... patches welcome :)

For the interface I think a drop-down of eligible CSS/JS paths would be best. Generating a drop-down of available tests shouldn't be too hard since that data is within this module. People who want to fill paths in manually can create a hook in template.php or the .module file.

In terms of integration, my preference is for filing issues in other modules and using this module as a generic hub. It is the most scalable solution in my opinion. I would certainly help write patches for other modules though!