UNPKG

@vimeo/iris

Version:
18 lines (15 loc) 529 B
import { _ as __read } from '../../tslib.es6-7f0e734f.js'; import { SSR } from './SSR.esm.js'; function createElement(tag, attributes) { if (SSR) return null; var element = document.createElement(tag); // assign HTMLElement-like object of attributes and // their values to newly created Element Object.entries(attributes).map(function (_a) { var _b = __read(_a, 2), attr = _b[0], value = _b[1]; return (element[attr] = value); }); return element; } export { createElement };