Home >headlines >Bootstrap 5 is saying goodbye to jQuery and will remove its dependency on it

Bootstrap 5 is saying goodbye to jQuery and will remove its dependency on it

云罗郡主
云罗郡主Original
2019-02-14 11:46:364748browse




Bootstrap latest version 4.3.0 was released yesterday as Bootstrap 4.3 As part of the release, the team also announced development plans for the next major version, Bootstrap 5. [Recommended tutorial: Bootstrap Tutorial]

The development team stated that after the v4.3 version is released, some things will be implemented in the process of developing Bootstrap 5. Key changes, perhaps major changes, will be considered the foundation of Bootstrap 5. The development team highlighted the following aspects:

1. Abandon jQuery: Bootstrap 5 will remove jQuery as a dependency. The development team has been working on this for a long time, and the PR is in progress and nearly completed

2. Improve the development branch: The v3-dev branch will become the master branch ; v4-dev will remain the same, but a new master branch will be cut from this branch to develop the v5 version

3. Migrate from Jekyll to Hugo: There is currently a PR in progress After removing jQuery, the biggest dependency, and almost completing it, the development team stated that it will use native pure JavaScript to replace jQuery in the future. This is a bit similar to GitHub’s move to remove jQuery when it revamped and restructured its page last year.

At that time, the front-end team of GitHub took advantage of the opportunity of the revision to remove jQuery when reconstructing the page, and did not use other frameworks to replace jQuery, but used native JS:

Use querySelectorAll to query DOM nodes

Use fetch instead of ajax (use XHR on unsupported browsers)

Use proxy events for event processing

For some that have not yet been The implemented DOM standard is written as a polyfill

Use more custom elements (CustomElement)

Bootstrap 5 is saying goodbye to jQuery and will remove its dependency on it

Bootstrap 5 is saying goodbye to jQuery and will remove its dependency on itBootstrap 5 is saying goodbye to jQuery and will remove its dependency on it As you can see, it has been a year and a half since the PR to remove jQuery in Bootstrap 5. It currently contains 74 commits and is in the Open state, with conflicts still to be resolved.






##

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn