/* 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/. */ import { MozLitElement } from "chrome://global/content/lit-utils.mjs"; import { html, nothing } from "chrome://global/content/vendor/lit.all.mjs"; // eslint-disable-next-line import/no-unassigned-import import "chrome://browser/content/widgets/moz-widget-header.mjs"; const WIDGET_SANDBOX = "allow-forms allow-same-origin allow-scripts allow-popups allow-popups-to-escape-sandbox"; const FRAME_SLOT = "frame"; /** * Hosts a self-contained, interactive widget for brief interactions. * * It clips embedded content to the bounds set by the `size` attribute. * * If `src` is set, the widget content is loaded in a `` child in chrome documents and an ``; } #renderMenuButton() { return html``; } render() { const usesIframe = this.src && !this.#browser; const label = this.title && !usesIframe ? this.title : nothing; return html`
${this._menuId && !this._hasHeader ? this.#renderMenuButton() : nothing}
${this.#renderContent()}
`; } } customElements.define("moz-widget", MozWidget);