Remove deprecated jquery-once

Created on 9 March 2022, over 2 years ago
Updated 16 August 2023, about 1 year ago

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.

📌 Task
Status

Fixed

Version

10.0

Component
Javascript 

Last updated 1 day ago

Created by

🇫🇮Finland lauriii Finland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇿New Zealand jweowu

    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.

Production build 0.71.5 2024