diff options
Diffstat (limited to 'toolkit/components/certviewer/content/components/about-certificate-items.mjs')
-rw-r--r-- | toolkit/components/certviewer/content/components/about-certificate-items.mjs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/toolkit/components/certviewer/content/components/about-certificate-items.mjs b/toolkit/components/certviewer/content/components/about-certificate-items.mjs new file mode 100644 index 0000000000..9fa856c61e --- /dev/null +++ b/toolkit/components/certviewer/content/components/about-certificate-items.mjs @@ -0,0 +1,33 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* eslint-env mozilla/remote-page */ + +import { ListItem } from "./list-item.mjs"; + +export class AboutCertificateItems extends HTMLElement { + constructor(id, data) { + super(); + this.id = id; + this.data = data; + } + + connectedCallback() { + let template = document.getElementById("about-certificate-items-template"); + let templateHtml = template.content.cloneNode(true); + + this.attachShadow({ mode: "open" }).appendChild(templateHtml); + + document.l10n.connectRoot(this.shadowRoot); + + this.render(); + } + + render() { + for (let cert of this.data) { + this.shadowRoot.append(new ListItem(cert)); + } + } +} +customElements.define("about-certificate-items", AboutCertificateItems); |