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
  • Issues
  • #34310
Closed
Open
Issue created Jun 20, 2021 by GeoSot@GeoSotContributor

Components `getInstance` should be able to resolve string selectors and jQuery objects as the componnent constructor

Our Components constructor accepts HTMLElement | css-selector | jQuery object and resolves it to HTMLElement

https://github.com/twbs/bootstrap/blob/34db122ecce249c81a519dbcb4caf42dac58460e/js/src/base-component.js#L23-L25

In the opposite way, getInstance accepts only HTMLElement

https://github.com/twbs/bootstrap/blob/34db122ecce249c81a519dbcb4caf42dac58460e/js/src/base-component.js#L50-L53

It would be more consistent getInstance to support multiple types of argument too

Assignee
Assign to
Time tracking