jsxcreate | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function jsxcreate

    • Function to create for jsx, create elements directly (instead of virtual dom nodes).

      import * as dompack from 'dompack';

      /* @jsx dompack.jsxcreate / / @jsxFrag dompack.jsxfragment */ your code

      Type Parameters

      • K extends keyof HTMLElementTagNameMap

      Parameters

      • element: K

        Name of the element to create

      • attributes: CreateAttributes
      • ...childNodes: (string | number | Node)[]

        Any child nodes to add immediately

      Returns HTMLElementTagNameMap[K]

    • Function to create for jsx, create elements directly (instead of virtual dom nodes).

      import * as dompack from 'dompack';

      /* @jsx dompack.jsxcreate / / @jsxFrag dompack.jsxfragment */ your code

      Parameters

      • element: string | CreateElementFunction

        Name of the element to create

      • attributes: CreateAttributes
      • ...childNodes: (string | number | Node)[]

        Any child nodes to add immediately

      Returns HTMLElement