RuKoder.ru RUKODER.ru
11 ЯНВ 2017
0

premonish - js скрипт для предсказания, с чем будет взаимодействовать пользователь дальше

JavaScript
Пример
import Premonish from 'premonish';
const premonish = new Premonish({
  selectors: ['a', '.list-of' '.selectors', '.to', '#watch'],
  elements: [] // Alternatively, provide a list of DOM elements to watch
});

premonish.onIntent(({el, confidence}) => {
  console.log(el); // The DOM node we suspect the user is about to interact with.
  console.log(confidence); // How confident are we about the user's intention? Scale 0-1
});

https://mathisonian.github.io/premonish/

Добавить комментарий

Категории:

  • CSS (121)
  • PHP (301)
  • JavaScript (704)

Оставить на заметку в:

© 2025 RuKoder.ru