TODO: 推翻整个项目重新建立根基
This commit is contained in:
16
client/ui/chat-elements/chat-text-container.ts
Normal file
16
client/ui/chat-elements/chat-text-container.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
customElements.define('chat-text-container', class extends HTMLElement {
|
||||
declare container: HTMLDivElement
|
||||
constructor() {
|
||||
super()
|
||||
|
||||
this.attachShadow({ mode: 'open' })
|
||||
}
|
||||
connectedCallback() {
|
||||
const shadow = this.shadowRoot as ShadowRoot
|
||||
|
||||
this.container = document.createElement('div')
|
||||
this.container.style.padding = '13px'
|
||||
shadow.appendChild(this.container)
|
||||
this.container.innerHTML = this.innerHTML
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user