This commit is contained in:
Pete Matsyburka committed 2024-10-25 16:17:57 +03:00
1 parent 3975a03cb4
commit 72bbdb38bf
4 files changed
+27 -3

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
export default class extends HTMLElement {
connectedCallback () {
const maskedToken = this.input.value
this.input.addEventListener('focus', () => {
this.input.value = this.dataset.token
this.input.select()
})
this.input.addEventListener('focusout', () => {
this.input.value = maskedToken
})
}
get input () {
return this.querySelector('input')
}
}