function pwa_library in Progressive Web App 7
Same name and namespace in other branches
- 7.2 pwa.module \pwa_library()
Implements hook_library().
File
- ./
pwa.module, line 93
Code
function pwa_library() {
$path = drupal_get_path('module', 'pwa');
return [
'serviceworker' => [
'version' => '0.2',
'js' => [
$path . '/js/serviceworker-load.js' => [
'scope' => 'footer',
],
0 => [
'data' => [
'pwa' => [
'path' => url('/pwa/serviceworker/js'),
'registrationEvent' => variable_get('pwa_sw_registration_event', PWA_SW_REGISTRATION_EVENT_DEFAULT),
],
],
'type' => 'setting',
],
],
'dependencies' => [],
],
];
}