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.

Command icon 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

mlncn created an issue. See original summary.

immaculatexavier made their first commit to this issue’s fork.

immaculatexavier’s picture

Status: Active » Needs review

Through issue fork, I fixed in accordance with the proposed resolution. Please review

sutharsan’s picture

Status: Needs review » Needs work

Please fix the failing test too.

sutharsan’s picture

@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!

tr’s picture

Version: 4.0.x-dev » 4.1.x-dev
tr’s picture

I 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?

tr changed the visibility of the branch immaculate.x-4.0.x-patch-49281 to hidden.