- Issue created by @dv@blinker.digital
- Issue was unassigned.
- Status changed to Fixed
10 months ago 8:37pm 4 March 2024 - 🇨🇭Switzerland florianmuellerch Aarau, Switzerland
Hi @dusandelucia
The short answer is: "It depends" :-)
I personally would not migrate any custom code, if you just started and then installed this module. Every jquery.once usage will continue to work as usual, so there's no need to change your code.
However all other modules most likely already have changed their own code and use the built-in Drupal.once(), which is also fine.
I would avoid using both jQuery.once() and Drupal.once() in the same module, let alone in the same file. I would decide on one of the two and then consistently only use that, to avoid problems.
In fact, I also have a project running that uses now both Drupal.once() and jQuery.once() in the same large module, but it runs just fine - if the two libraries do their own jobs and don't intersect with each other.Hope that helps - happy site building!
- 🇦🇹Austria dv@blinker.digital
Ok, that helps. The custom code will not be migrated than. Many thanks!
Automatically closed - issue fixed for 2 weeks with no activity.