Files
MoonPro.net/MP-ADM/Scripts/src/utils/getReferenceNode.js
T
Samuele E. Locatelli 91ccb018af Code cleanup con CodeMaid
2020-09-11 12:45:52 +02:00

10 lines
402 B
JavaScript

/**
* Returns the reference node of the reference object, or the reference object itself.
* @method
* @memberof Popper.Utils
* @param {Element|Object} reference - the reference element (the popper will be relative to this)
* @returns {Element} parent
*/
export default function getReferenceNode(reference) {
return reference && reference.referenceNode ? reference.referenceNode : reference;
}