Problem/Motivation

Bootstrap and Popper libraries do not require jQuery any more.

Drupal Core is also not requiring jQuery by default.

jQuery 3.4.1 is around 86kb compressed. That is quite a bit of JS code that needs to be parsed and executed per each page load.

We should try to remove jQuery dependency from our JS code.

states.js use closest which will probably be tricky.

entity-browsers.tabs.js depends on entity_browsers module JS code which uses jQuery but it seems that both calls for Drupal.theme.entityTabs and Drupal.theme.entityTab are again wrapped in $() which means we can just return a string or HTML element.

navbar.js has a lot of code but seems nothing too tricky to replace.

tabledrag.js use jQuery.extend but we should be able to just to Drupal.theme.tableDragChangedWarning = function () {...}; for this.

Issue fork bs_base-3107476

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

pivica created an issue. See original summary.

pivica’s picture

Version: 8.x-1.x-dev » 2.x-dev
pivica’s picture

Version: 2.x-dev » 2.0.x-dev

pivica’s picture

Title: Remove jQuery dependency as much as possible » Remove jQuery dependency

  • pivica committed 147154d0 on 2.0.x
    fix: #3107476 Remove jQuery dependency from bs_base.  
    
    Rewrites js/...
pivica’s picture

Status: Active » Fixed

Done.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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