Problem/Motivation

The jquery-once assets were retained for BC. There's also misc/jquery.once.bc.js file and jquery.once.bc library definition. These can be now removed in Drupal 10.

Proposed resolution

Remove jquery.once.bc library definition, misc/jquery.once.bc.js file, and all references to these.

Issue fork drupal-3268550

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lauriii created an issue. See original summary.

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

longwave’s picture

Status: Active » Needs review

Spokje’s picture

Status: Needs review » Reviewed & tested by the community

- MR does what it says on the tin: Remove jquery.once and jquery.once.bc and all references
- Applied MR diff locally and found no more references to jquery.once, neither programmatically nor in documentation. (Even removed from core/COPYRIGHT.txt)
- TestBot returns green.

RTBC for me.

  • lauriii committed 7362987 on 10.0.x
    Issue #3268550 by longwave, Spokje: Remove deprecated jquery-once
    

lauriii’s picture

Status: Reviewed & tested by the community » Fixed

👋 jquery-once 💀🪦😢

Committed 7362987 and pushed to 10.0.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jweowu’s picture

Why was this done?

The non-jquery 'once' is not a drop-in replacement; code has to be modified to use it.

Just because core wants to use less jquery doesn't mean that people's Drupal sites have suddenly stopped using jquery; and that's fine. If people want to use jquery, and also keep using jquery.once(), I see no problem with that whatsoever.

The presence of the jquery.once.js file has no ill effects on sites which do not use jquery and never load that file.

Conversely, the removal of jquery.once has a significant effect on virtually every site which does use jquery.

I think this introduces a significant pain point for essentially no reason.