export default {
    inserted (el, bindings, {context}) {
        if (context.appendToBody) {
            const {height, top, left, width} = context.$refs.toggle.getBoundingClientRect();

            el.unbindPosition = context.calculatePosition(el, context, {
                width: width + 'px',
                top: (window.scrollY + top + height) + 'px',
                left: (window.scrollX + left) + 'px',
            });

            document.body.appendChild(el);
        }
    },

    unbind (el, bindings, {context}) {
        if (context.appendToBody) {
            if (el.unbindPosition && typeof el.unbindPosition === 'function') {
                el.unbindPosition();
            }
            if (el.parentNode) {
                el.parentNode.removeChild(el);
            }
        }
    },
}

@@ -180,17 +180,144 @@
 Rect();%0A
+            let scrollX = window.scrollX %7C%7C window.pageXOffset;%0A            let scrollY = window.scrollY %7C%7C window.pageYOffset;
 %0A
-
         
@@ -440,30 +440,23 @@
   top: (
-window.
 scroll
-Y
+X
  + top +
@@ -495,30 +495,23 @@
  left: (
-window.
 scroll
-X
+Y
  + left)

make appendToBody directive IE11 friendly