Reference · Facts, line drawings and positions
EmbedSettingstype
Where the embed code points: the package's version on jsDelivr, and the published demo, where embed.html is.
Import it
import type { EmbedSettings } from "@johnmorrisdotca/wakusei-planets";
Definition
interface EmbedSettings {
site?: string;
cdn?: string;
}
Members
| Name | Type | Description |
|---|---|---|
site (optional) | string | undefined | The published demo's address, ending in a slash. |
cdn (optional) | string | undefined | The package's address on the CDN, with its version. |
Examples
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>What it prints (run when this page was built)