hunk.code_window:   styles: {|
       [string]: $Shape<CSSStyleDeclaration>,
     |},
     modifiersData: Object,
   |};
   export type Modifier = {|
  
hunk.labels: keep keep keep add keep keep keep
hunk.after_edit:   reset: boolean,
  
hunk.file_path: src/types.js
hunk.type: add
file: // @flow
  import getWindow from './getWindow';
  
  export default function getOffsetParent(element: Element) {
    const offsetParent =
      element instanceof HTMLElement ? element.offsetParent : null;
    const window = getWindow(element);
  
    if (
      offsetParent &&
      offsetParent.nodeName &&
      offsetParent.nodeName.toUpperCase() === 'BODY'
    ) {
      return window;
    }
  
    return offsetParent || window;
  }
  