mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
18 lines
405 B
JavaScript
18 lines
405 B
JavaScript
export default class extends HTMLElement {
|
|
connectedCallback () {
|
|
this.input.addEventListener('focus', () => {
|
|
this.maskedToken = this.input.value
|
|
this.input.value = this.dataset.token
|
|
this.input.select()
|
|
})
|
|
|
|
this.input.addEventListener('focusout', () => {
|
|
this.input.value = this.maskedToken
|
|
})
|
|
}
|
|
|
|
get input () {
|
|
return this.querySelector('input')
|
|
}
|
|
}
|