UNPKG

ngx-bootstrap

Version:
16 lines 528 B
/** * Check if the given element is fixed or is inside a fixed parent */ import { getStyleComputedProperty } from './getStyleComputedProperty'; import { getParentNode } from './getParentNode'; export function isFixed(element) { const nodeName = element.nodeName; if (nodeName === 'BODY' || nodeName === 'HTML') { return false; } if (getStyleComputedProperty(element, 'position') === 'fixed') { return true; } return isFixed(getParentNode(element)); } //# sourceMappingURL=isFixed.js.map