plain-overlay.esm.js
function setStyle(element, styleProps, savedStyleProps, propNames) {
  var style = element.style;
  (propNames || Object.keys(styleProps)).forEach(function (prop) {
    if (styleProps[prop] != null) {
      if (savedStyleProps && savedStyleProps[prop] == null) {
        savedStyleProps[prop] = style[prop];
      }
      style[prop] = styleProps[prop];
      styleProps[prop] = null;
    }
  });
  return element;
}
function setStyle(element, styleProps, savedStyleProps, propNames) {
  var style = element.style;
  (propNames || Object.keys(styleProps)).forEach(function (prop) {
    if (styleProps[prop] != null) {
      if (savedStyleProps && savedStyleProps[prop] == null) {
        savedStyleProps[prop] = style[prop];
      }
      style[prop] = styleProps[prop];
      styleProps[prop] = null;
    }
  });
  return element;
}
function setStyle ( element , styleProps , savedStyleProps , propNames ) { var style = element . style ; ( propNames || Object . keys ( styleProps ) ) . forEach ( function ( prop ) { if ( styleProps [ prop ] != null ) { if ( savedStyleProps && savedStyleProps [ prop ] == null ) { savedStyleProps [ prop ] = style [ prop ] ; } style [ prop ] = styleProps [ prop ] ; styleProps [ prop ] = null ; } } ) ; return element ; }
Set style properties while saving current properties.
@param {Element} element - Target element.
@param {Object} styleProps - New style properties.
@param {(Object|null)} savedStyleProps - Current style properties holder.
@param {Array} [propNames] - Names of target properties.
@returns {Element} Target element itself.
Set style properties while saving current properties .