Añadir 'components/project.js'
parent
a1f540e3a6
commit
495035e572
@ -0,0 +1,20 @@
|
|||||||
|
class Project extends HTMLElement {
|
||||||
|
constructor() {
|
||||||
|
const shadow = this.attachShadow({mode: 'open'})
|
||||||
|
const textArea = document.createElement('textarea')
|
||||||
|
textArea.defaultValue = localStorage.getItem(
|
||||||
|
window.location.hash
|
||||||
|
)
|
||||||
|
textArea.addEventListener('input', e => {
|
||||||
|
localStorage.setItem(
|
||||||
|
window.location.hash,
|
||||||
|
e.target.defaultValue
|
||||||
|
)
|
||||||
|
})
|
||||||
|
shadow.appendChild(textArea)
|
||||||
|
}
|
||||||
|
|
||||||
|
connectedCallback() {
|
||||||
|
// add css
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue