function pwa_webpush_pwa_serviceworker_script_alter in Progressive Web App 7.2
Implements hook_pwa_serviceworker_script_alter().
Add the notification handling script to the serviceworker.
File
- modules/
pwa_webpush/ pwa_webpush.module, line 162
Code
function pwa_webpush_pwa_serviceworker_script_alter(&$scripts) {
$scripts['notifications'] = drupal_get_path('module', 'pwa_webpush') . '/js/serviceworker/notifications.js';
}