mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-05-05 02:54:47 +00:00
21 lines
431 B
JavaScript
21 lines
431 B
JavaScript
|
|
const fixtureId = 'fixture'
|
||
|
|
|
||
|
|
export const getFixture = () => {
|
||
|
|
let fixtureEl = document.getElementById(fixtureId)
|
||
|
|
|
||
|
|
if (!fixtureEl) {
|
||
|
|
fixtureEl = document.createElement('div')
|
||
|
|
fixtureEl.setAttribute('id', fixtureId)
|
||
|
|
fixtureEl.style.display = 'none'
|
||
|
|
document.body.appendChild(fixtureEl)
|
||
|
|
}
|
||
|
|
|
||
|
|
return fixtureEl
|
||
|
|
}
|
||
|
|
|
||
|
|
export const clearFixture = () => {
|
||
|
|
const fixtureEl = getFixture()
|
||
|
|
|
||
|
|
fixtureEl.innerHTML = ''
|
||
|
|
}
|