Issue #3238915 by Bhanu951, hooroomoo, bnjmnm: Refactor (if feasible) uses of the jQuery ready function to use VanillaJS

merge-requests/3234/head
bnjmnm 2023-04-07 10:50:32 -04:00
parent d05e452f41
commit e3a2b4db80
2 changed files with 4 additions and 4 deletions

View File

@ -38,7 +38,7 @@
"jquery/no-parse-html": 0,
"jquery/no-prop": 0,
"jquery/no-proxy": 0,
"jquery/no-ready": 0,
"jquery/no-ready": 2,
"jquery/no-serialize": 0,
"jquery/no-show": 0,
"jquery/no-size": 2,

View File

@ -3,8 +3,8 @@
* Statistics functionality.
*/
(function ($, Drupal, drupalSettings) {
$(document).ready(() => {
(function ($, drupalSettings) {
setTimeout(() => {
$.ajax({
type: 'POST',
cache: false,
@ -12,4 +12,4 @@
data: drupalSettings.statistics.data,
});
});
})(jQuery, Drupal, drupalSettings);
})(jQuery, drupalSettings);