mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-26 23:54:23 +01:00
code-examples.js: switch to firstElementChild
(#37570)
This ensures that we will get the first element child and not text
This commit is contained in:
parent
d16efb79b6
commit
18fec8bf36
@ -56,7 +56,7 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
clipboard.on('success', event => {
|
clipboard.on('success', event => {
|
||||||
const iconFirstChild = event.trigger.querySelector('.bi').firstChild
|
const iconFirstChild = event.trigger.querySelector('.bi').firstElementChild
|
||||||
const tooltipBtn = bootstrap.Tooltip.getInstance(event.trigger)
|
const tooltipBtn = bootstrap.Tooltip.getInstance(event.trigger)
|
||||||
const namespace = 'http://www.w3.org/1999/xlink'
|
const namespace = 'http://www.w3.org/1999/xlink'
|
||||||
const originalXhref = iconFirstChild.getAttributeNS(namespace, 'href')
|
const originalXhref = iconFirstChild.getAttributeNS(namespace, 'href')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user