EmbedSettings型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Where the embed code points: the package's version on jsDelivr, and the published demo, where embed.html is.
インポート
import type { EmbedSettings } from "@johnmorrisdotca/wakusei-planets";
定義
interface EmbedSettings {
site?: string;
cdn?: string;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
site (省略可) | string | undefined | The published demo's address, ending in a slash. |
cdn (省略可) | string | undefined | The package's address on the CDN, with its version. |
例
import { embedCode } from "@johnmorrisdotca/wakusei-planets";
console.log(embedCode({ body: "mars", look: "line" }, "iframe", { site: "https://example.com/wakusei/" }));<iframe
src="https://example.com/wakusei/embed.html?body=mars&look=line"
title="Mars"
width="320"
height="320"
loading="lazy"
style="border: 0"
></iframe>出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。