Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !33542

v5: Export DOM utils

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/mistic100/dom-utils into main Apr 03, 2021
  • Overview 9
  • Commits 2
  • Pipelines 1
  • Changes 3

Created by: mistic100

Follow up of #32941

This commit exports exports all the DOM utils into a domUtils property, to be able to use them in thrid party JS plugins.

Motivation : The plan is to allow third party plugins to integrates as best as possible into Bootstrap system. Previously this was done through jQuery. But now Bootstrap is basically starting from scratch and locking itself.

  • Without Data, third party plugins cannot interact with core and other plugins because the map storing instances is private.
  • Without EventHandler, third party plugins will never be able to have a similar event system, neither seamlessly integrate with jQuery when present. This is IMHO critical because it will lead to a scatter of patterns, namings, param handling, etc.
  • SelectorEngine and Manipulator are bonuses, they are not necessary.

Usage : Since 2014 I develop Bootstrap Confirmation and always tried to stick to Bootstrap patterns, sometimes refusing changes because it would be incompatible with Popover behavior. I wouldn't like to offer a degraded v5 migration.

What next : I think Bootstrap would benefits a documentation, or a least an introduction, to plugins creations, perhaps on the Extend page.
Unfortunately I don't know enough internals to propose somthing.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/mistic100/dom-utils