1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-10-02 16:28:26 +02:00

Remove jQuery support in plugins

This commit is contained in:
Mark Otto
2025-02-21 21:06:51 -08:00
parent 37d579548a
commit 3f88e39de9
15 changed files with 7 additions and 385 deletions

View File

@@ -9,7 +9,7 @@ import BaseComponent from './base-component.js'
import EventHandler from './dom/event-handler.js'
import SelectorEngine from './dom/selector-engine.js'
import {
defineJQueryPlugin, getElement, isDisabled, isVisible
getElement, isDisabled, isVisible
} from './util/index.js'
/**
@@ -259,22 +259,6 @@ class ScrollSpy extends BaseComponent {
}
}
// Static
static jQueryInterface(config) {
return this.each(function () {
const data = ScrollSpy.getOrCreateInstance(this, config)
if (typeof config !== 'string') {
return
}
if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
throw new TypeError(`No method named "${config}"`)
}
data[config]()
})
}
}
/**
@@ -287,10 +271,4 @@ EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
}
})
/**
* jQuery
*/
defineJQueryPlugin(ScrollSpy)
export default ScrollSpy