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:
@@ -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
|
||||
|
Reference in New Issue
Block a user