|
|
|
@ -3,13 +3,13 @@ export class Project extends HTMLElement {
|
|
|
|
super()
|
|
|
|
super()
|
|
|
|
const shadow = this.attachShadow({mode: 'open'})
|
|
|
|
const shadow = this.attachShadow({mode: 'open'})
|
|
|
|
const textArea = document.createElement('textarea')
|
|
|
|
const textArea = document.createElement('textarea')
|
|
|
|
textArea.defaultValue = localStorage.getItem(
|
|
|
|
textArea.value = localStorage.getItem(
|
|
|
|
window.location.hash
|
|
|
|
window.location.hash
|
|
|
|
)
|
|
|
|
) ?? ''
|
|
|
|
textArea.addEventListener('input', e => {
|
|
|
|
textArea.addEventListener('input', e => {
|
|
|
|
localStorage.setItem(
|
|
|
|
localStorage.setItem(
|
|
|
|
window.location.hash,
|
|
|
|
window.location.hash,
|
|
|
|
e.target.defaultValue
|
|
|
|
e.target.value
|
|
|
|
)
|
|
|
|
)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
shadow.appendChild(textArea)
|
|
|
|
shadow.appendChild(textArea)
|
|
|
|
|