setAttributesWithAttributes.js 403 B

12345678910111213
  1. "use strict";
  2. /* istanbul ignore next */
  3. function setAttributesWithoutAttributes(styleElement, attributes) {
  4. var nonce = typeof __webpack_nonce__ !== "undefined" ? __webpack_nonce__ : null;
  5. if (nonce) {
  6. attributes.nonce = nonce;
  7. }
  8. Object.keys(attributes).forEach(function (key) {
  9. styleElement.setAttribute(key, attributes[key]);
  10. });
  11. }
  12. module.exports = setAttributesWithoutAttributes;