mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-02 01:42:36 +02:00
Make the attribute methods bs specific (#32173)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -31,11 +31,11 @@ function normalizeDataKey(key) {
|
||||
|
||||
const Manipulator = {
|
||||
setDataAttribute(element, key, value) {
|
||||
element.setAttribute(`data-${normalizeDataKey(key)}`, value)
|
||||
element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)
|
||||
},
|
||||
|
||||
removeDataAttribute(element, key) {
|
||||
element.removeAttribute(`data-${normalizeDataKey(key)}`)
|
||||
element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)
|
||||
},
|
||||
|
||||
getDataAttributes(element) {
|
||||
@@ -57,7 +57,7 @@ const Manipulator = {
|
||||
},
|
||||
|
||||
getDataAttribute(element, key) {
|
||||
return normalizeData(element.getAttribute(`data-${normalizeDataKey(key)}`))
|
||||
return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))
|
||||
},
|
||||
|
||||
offset(element) {
|
||||
|
Reference in New Issue
Block a user