It's documented, but the variable does not exists. How about adding it via hook_process_HOOK() until #865536: drupal_add_js() is missing the 'browsers' option has been fixed?
/**
* Implements hook_process_HOOK().
*/
function html5_tools_process_html(&$variables) {
// @todo: Append html5shim until #865536: drupal_add_js() is missing the 'browsers' option is fixed.
$default_query_string = variable_get('css_js_query_string', '0');
$variables['scripts'] .= '<!--[if lt IE 9]>' . "\n";
$variables['scripts'] .= '<script src="' . file_create_url(drupal_get_path('module', 'html5_tools') . '/js/html5shiv-printshiv.js') . '?' . $default_query_string . '"></script>' . "\n";
$variables['scripts'] .= '<![endif]-->' . "\n";
}
I've added this to my themes template.php.
Comments
Comment #0.0
hass commentedA
Comment #1
bleen commentedI have no problem adding this ... my only question really is wether or not there is ever a situation where we would be forcing html5shiv on a site that doesnt want it? I cant think of a case where this would be true, but if so we should have a setting somewhere.
Comment #2
hass commentedThat's a good point. It's highly theme related, but html5, too. Maybe won't fix here - I'm not sure.
Comment #3
bleen commentedWe could form_alter the theme settings form and add a checkbox ... not a big deal
Comment #3.0
bleen commentedA