UNPKG

722 BJavaScriptView Raw
1'use strict';
2
3const index = require('./index-a0a08b2a.js');
4const helpers = require('./helpers-d381ec4d.js');
5
6const startStatusTap = () => {
7 const win = window;
8 win.addEventListener('statusTap', () => {
9 index.readTask(() => {
10 const width = win.innerWidth;
11 const height = win.innerHeight;
12 const el = document.elementFromPoint(width / 2, height / 2);
13 if (!el) {
14 return;
15 }
16 const contentEl = el.closest('ion-content');
17 if (contentEl) {
18 new Promise(resolve => helpers.componentOnReady(contentEl, resolve)).then(() => {
19 index.writeTask(() => contentEl.scrollToTop(300));
20 });
21 }
22 });
23 });
24};
25
26exports.startStatusTap = startStatusTap;