'Modernizr.borderradius', // If the test PASSES load these files. Example shows a hardcoded path. 'yep' => array('/css/radius.css'), // If the test FAILS load these files. Example shows a Drupal path (don't // forget opening slash, or it won't work except at your site root) 'nope' => array('/' . drupal_get_path('module', 'modernizr') . '/fake/path/to/radius.css'), // These resources will always load regardless of the test results. // 'load' and 'both' offer the exact same functionality. 'both' => array('/always/loaded.js'), 'load' => array('/always/loaded.js'), // Each JavaScript callback should be enclosed inside an anonymous function. // Take care to format correctly. You can provide an array of functions that // should match the number of items in your yep or nope properties. 'callback' => array('function(){console.log("If you can see this, a Modernizr.load() individual callback was fired.")}'), // The final 'complete' callback requires an anonymous JavaScript function. // Take care to format correctly. Despite being inside an array, you should // only add one function. 'complete' => array('function(){console.log("If you can see this, the Modernizr.load() complete callback was fired.")}'), ); return $load; } /** * @} End of "addtogroup hooks". */