UNPKG

@huluvu424242/honey-slideshow

Version:

Text to Speech component wich is reading texts from DOM elements.

22 lines (21 loc) 759 B
import { i as readTask, j as writeTask } from './index-a2883912.js'; var startStatusTap = function () { var win = window; win.addEventListener('statusTap', function () { readTask(function () { var width = win.innerWidth; var height = win.innerHeight; var el = document.elementFromPoint(width / 2, height / 2); if (!el) { return; } var contentEl = el.closest('ion-content'); if (contentEl) { contentEl.componentOnReady().then(function () { writeTask(function () { return contentEl.scrollToTop(300); }); }); } }); }); }; export { startStatusTap };