@catch brought this up in #1077878-157: Add HTML5shiv to core:

I should have caught this in #865536: drupal_add_js() is missing the 'browsers' option but I didn't..

+ 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE),
Why can't I do:

+ 'browsers' => array('IE' => 'lte IE 8',

and have that just assume I don't want it for anything else. This would match how conditional comments actually look as well.

It's off-topic here but since this is the first core code using the feature (and I don't think the tests in the other issue tested the hook_library_info() version) it'd be good to sort this out before we start using it any more.

It makes sense to me to simplify this, but not sure if there's a specific reason that we can't. Any ideas?

Comments

Jacine’s picture

Status: Active » Closed (won't fix)

Duh, just realized this is needed and was made as simple possible by default.

Jacine’s picture

Status: Closed (won't fix) » Closed (works as designed)