TyphonJS Runtime Library (FVTT) 0.3.0
  • #runtime/svelte/action/dom/inline-svg
  • inlineSvg

Function inlineSvg

  • inlineSvg(node: SVGElement, param: InlineSvgParameter): InlineSvgActionReturn
  • Svelte action for dynamically inlining remote-fetched SVG into DOM.

    Parameters

    • node: SVGElement

      SVGElement to inline SVG into

    • param: InlineSvgParameter

      config for the action.

    Returns InlineSvgActionReturn

    Example

    <script>
    import { inlineSvg } from '@svelte-put/inline-svg;
    </script>

    <svg use:inlineSvg={"http://example.com/icon.svg"}></svg>

Settings

Member Visibility
Demo - Essential Svelte ESM
TyphonJS Runtime Library (FVTT) 0.3.0