wip: wcag structure
This commit is contained in:
parent
4c31dbbed0
commit
4dd445be57
48 changed files with 461 additions and 137 deletions
|
|
@ -4,7 +4,11 @@ import * as bootstrap from "bootstrap"
|
|||
// Connects to data-controller="toast"
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
const toastBootstrap = bootstrap.Toast.getOrCreateInstance(this.element)
|
||||
toastBootstrap.show()
|
||||
const shownKey = `toastsShown[${this.element.getAttribute("data-ts")}]`
|
||||
if(!window.sessionStorage.getItem(shownKey)) {
|
||||
window.sessionStorage.setItem(shownKey, Date.now());
|
||||
const toastBootstrap = bootstrap.Toast.getOrCreateInstance(this.element)
|
||||
toastBootstrap.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue