UNPKG

@braze/web-sdk

Version:

Braze SDK for web sites and other JS platforms.

14 lines (13 loc) 492 B
import r, { OPTIONS as z } from "../../managers/braze-instance.js"; export function attachCSS(n, t, o) { const c = n || document.querySelector("head"), e = `ab-${t}-css-definitions-${"6.1.0".replace(/\./g, "-")}`; if (!c) return; const s = c.ownerDocument || document; if (null == s.getElementById(e)) { const n = s.createElement("style"); (n.innerHTML = o || ""), (n.id = e); const t = r.ee(z.er); null != t && n.setAttribute("nonce", t), c.appendChild(n); } }