underbbs/frontend/ts/message-element.ts

20 lines
569 B
TypeScript
Raw Normal View History

import util from "./util"
var _ = util._
export class MessageElement extends HTMLElement {
static observedAttributes = [ "data-id", "data-adapter", "data-replyCt", "data-reactionCt", "data-boostCt" ]
private _id: string | null = null;
private _adapter: any;
constructor() {
super();
}
connectedCallback() {
this._id = this.getAttribute("data-id");
this._adapter = _("settings").adapters.filter((a: any)=>a.nickname == this.getAttribute("data-adapter"))[0];
// grab message content from the store and format our innerHTML
}
}