info-view.ts 460 Bytes
Newer Older
1 2 3 4 5 6
import { View } from "./view";

export class InfoView extends View {

  constructor(idOrContainer: HTMLElement | string) {
    super(idOrContainer);
7
    fetch("info-view.html")
8 9 10 11 12 13 14 15 16 17
      .then(response => response.text())
      .then(htmlText => this.divNode.innerHTML = htmlText);
  }

  createViewElement(): HTMLElement {
    const infoContainer = document.createElement("div");
    infoContainer.classList.add("info-container");
    return infoContainer;
  }
}