Problem/Motivation
JQuery is not a dependency for Drupal for the visitor-facing front-end (for example, the new Olivero theme does not use it) and there is an effort to remove JQuery altogether: #3052002: [meta] Replace JQuery with vanilla Javascript in core
Notably, JQuery was successfully removed from core's BigPipe module recently.
Steps to reproduce
Using Radioactivity adds 32kb of JQuery to pages only showing content to people, which did not need it before.
Proposed resolution
Refactor to remove the dependency on JQuery.
Remaining tasks
Replace $.ajax with Drupal.ajax (so core/jquery with core/drupal.ajax in the libraries dependencies.
…and i think that's it?
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork radioactivity-3293316
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #5
immaculatexavier commentedThrough issue fork, I fixed in accordance with the proposed resolution. Please review
Comment #6
sutharsan commentedPlease fix the failing test too.
Comment #7
sutharsan commented@immaculatexavier, thanks for bringing the issue to the table. But have you tested the patch? It's not just the test that fails, the emitter no longer works!
Comment #8
tr commentedComment #9
tr commentedI think this is a good thing to do.
But I can confirm that the changes to EmitTest cause it to fail. I'm not sure why those changes were made, because they don't seem to be related to the use of jQuery in any way?