@huluvu424242/honey-slideshow
Version:
Text to Speech component wich is reading texts from DOM elements.
26 lines (22 loc) • 728 B
JavaScript
;
const index = require('./index-99ba775b.js');
const startStatusTap = () => {
const win = window;
win.addEventListener('statusTap', () => {
index.readTask(() => {
const width = win.innerWidth;
const height = win.innerHeight;
const el = document.elementFromPoint(width / 2, height / 2);
if (!el) {
return;
}
const contentEl = el.closest('ion-content');
if (contentEl) {
contentEl.componentOnReady().then(() => {
index.writeTask(() => contentEl.scrollToTop(300));
});
}
});
});
};
exports.startStatusTap = startStatusTap;