Options
All
  • Public
  • Public/Protected
  • All
Menu
author

Gavin Sykes gavin@gavinsykes.uk (https://gavinsykes.uk/) @gavinsykes_uk

license

MIT

Index

Functions

Functions

appendSVGChild

  • appendSVGChild(elementType: string, target: HTMLElement | SVGElement, attributes?: Record<string, unknown>, text?: string): SVGElement | SVGDescElement | SVGGraphicsElement | SVGTextElement | SVGTitleElement
  • appendSVGChild takes a string, HTMLElement or SVGElement, Record<string, unknown> and string as its arguments. It either adds the defined SVG element to an existing SVG or SVG Element, or adds an <svg> to a HTML element.

    The return value is the generated SVG element.

    Parameters

    • elementType: string

      the type of element to add.

    • target: HTMLElement | SVGElement

      the HTML or SVG element to which to add the element.

    • Default value attributes: Record<string, unknown> = {}
    • Default value text: string = ""

    Returns SVGElement | SVGDescElement | SVGGraphicsElement | SVGTextElement | SVGTitleElement

Legend

  • Object literal
  • Function
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Interface

Generated using TypeDoc