UNPKG

e2ed

Version:

E2E testing framework over Playwright

18 lines (17 loc) 652 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.renderAttributes = renderAttributes; const sanitizeHtml_1 = require("../sanitizeHtml"); const createSafeHtmlWithoutSanitize = sanitizeHtml_1.createSafeHtmlWithoutSanitize; /** * Renders attributes object to safe HTML string. * This base client function should not use scope variables (except other base functions). * @internal */ function renderAttributes(attributes) { const parts = []; for (const key of Object.keys(attributes)) { parts.push(`${key}="${attributes[key]}"`); } return createSafeHtmlWithoutSanitize `${parts.join(' ')}`; }