retrofit icon indicating copy to clipboard operation
retrofit copied to clipboard

Drupal 7 always added jQuery and jQuery.once to the page

Open mglaman opened this issue 1 year ago • 2 comments

mglaman avatar Jul 05 '23 20:07 mglaman

An initial task could be to just add documentation about this for when people are adding custom JS files to a new library.

damienmckenna avatar Oct 19 '23 16:10 damienmckenna

That is true. One idea I had was to have https://github.com/retrofit-drupal/retrofit/blob/main/src/Render/AttachmentResponseSubscriber.php always add the libraries (doesn't fix the fact jQuery.once is removed)

If folks wanted to disable this feature, there can be a service parameter to stop it from being added. So sites/default/services.yml could control how Retrofit works in this regard

mglaman avatar Oct 19 '23 17:10 mglaman