import { $ } from 'mdui/jq'
customElements.define('chat-file', class extends HTMLElement {
constructor() {
super()
}
connectedCallback() {
this.style.display = 'block'
const e = new DOMParser().parseFromString(`
`, 'text/html').body.firstChild as HTMLElement
$(e).find('span').text($(this).attr("name"))
const href = $(this).attr('href')
// deno-lint-ignore no-window
e.onclick = () => window.open(href, '_blank')
this.appendChild(e)
}
})