* Set the attributes to the given popper * @method * @memberof Popper.Utils * @argument {Element} element - Element to apply the attributes to * @argument {Object} styles * Object with a list of properties and values which will be applied to the element
(element, attributes)
| 4128 | |
| 4129 | |
| 4130 | function setAttributes(element, attributes) { |
| 4131 | Object.keys(attributes).forEach(function (prop) { |
| 4132 | var value = attributes[prop]; |
| 4133 | |
| 4134 | if (value !== false) { |
| 4135 | element.setAttribute(prop, attributes[prop]); |
| 4136 | } else { |
| 4137 | element.removeAttribute(prop); |
| 4138 | } |
| 4139 | }); |
| 4140 | } |
| 4141 | /** |
| 4142 | * @function |
| 4143 | * @memberof Modifiers |
no outgoing calls
no test coverage detected
searching dependent graphs…