/** * HTML for showing infos about the current query or result. Also gives * the user the abiltiy to access the meta data for the current query or * result. */ const template = document.createElement('template'); template.innerHTML = `
Infos

0 of (to be determined) matches loaded.
Matches occured in (to be determined) corpus files:
(to be determined)

help The Server is still sending your results. Functions like "Export Results" and "Match Inspect" will be available after all matches have been loaded.

`; class InfoMenu extends HTMLElement { constructor() { super(); this.appendChild(template.content.cloneNode(true)); this.attachShadow({ mode: 'open' }); this.shadowRoot.appendChild(template.content.cloneNode(true)); } // methods that will be used in connectedCallback on eventListeners showMetadata() { console.log('Show metadata somehow'); } connectedCallback() { const showMetadataBtn = this.querySelector('#show-metadata'); showMetadataBtn.addEventListener('click', () => this.showMetadata()); } disconnectedCallback() { const showMetadataBtn = this.querySelector('#show-metadata'); showMetadataBtn.removeEventListener(); } } window.customElements.define('info-menu', InfoMenu); export { InfoMenu };