Skip to content
Snippets Groups Projects

Remove jquery .once() dependency and migrate to core/once

Merged Tiago Siqueira requested to merge issue/3375021-d10-compatibility-fixes into 2.0.x
2 files
+ 4
3
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 3
3
@@ -10,7 +10,7 @@
* support push notifications or service workers.
*/
(function ($, Drupal) {
(function ($, Drupal, once) {
'use strict';
@@ -35,7 +35,7 @@
}
// Ensure this is only executed once.
if ($("body").once('social_pwa-attach').length !== 1) {
if (once('social_pwa-attach', 'body').length !== 1) {
return;
}
@@ -511,4 +511,4 @@
return window.btoa(binary);
}
})(jQuery, Drupal);
})(jQuery, Drupal, once);
Loading