UNPKG

@thi.ng/hiccup-svg

Version:

SVG element functions for @thi.ng/hiccup & related tooling

16 lines (15 loc) 290 B
import { fattribs, ff } from "./format.js"; const image = (pos, url, attribs, ...body) => [ "image", fattribs({ ...attribs, // TODO replace w/ SVG2 `href` once Safari supports it "xlink:href": url, x: ff(pos[0]), y: ff(pos[1]) }), ...body ]; export { image };