docs/_vendor/popper.js/dist/popper.js
function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
  // compute reference element offsets
  const referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);

  // compute auto placement, store placement inside the data object,
  // modifiers will be able to edit `placement` if needed
  // and refer to originalPlacement to know the original value
  const placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);

  popper.setAttribute('x-placement', placement);

  // Apply `position` to popper before anything else because
  // without the position applied we can't guarantee correct computations
  setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });

  return options;
}
function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
  // compute reference element offsets
  const referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);

  // compute auto placement, store placement inside the data object,
  // modifiers will be able to edit `placement` if needed
  // and refer to originalPlacement to know the original value
  const placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);

  popper.setAttribute('x-placement', placement);

  // Apply `position` to popper before anything else because
  // without the position applied we can't guarantee correct computations
  setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });

  return options;
}
function applyStyleOnLoad ( reference , popper , options , modifierOptions , state ) { // compute reference element offsets const referenceOffsets = getReferenceOffsets ( state , popper , reference , options . positionFixed ) ; // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value const placement = computeAutoPlacement ( options . placement , referenceOffsets , popper , reference , options . modifiers . flip . boundariesElement , options . modifiers . flip . padding ) ; popper . setAttribute ( 'x-placement' , placement ) ; // Apply `position` to popper before anything else because // without the position applied we can't guarantee correct computations setStyles ( popper , { position : options . positionFixed ? 'fixed' : 'absolute' } ) ; return options ; }
Set the x-placement attribute before everything else because it could be used
to add margins to the popper margins needs to be calculated to get the
correct popper offsets.
@method
@memberof Popper.modifiers
@param {HTMLElement} reference - The reference element used to position the popper
@param {HTMLElement} popper - The HTML element used as popper
@param {Object} options - Popper.js options
Set the x - placement attribute before everything else because it could be used to add margins to the popper margins needs to be calculated to get the correct popper offsets .