monitor-text-selection:为给定元素的文本选择和取消选择发出事件

时间:2021-06-27 14:31:37
【文件属性】:
文件名称:monitor-text-selection:为给定元素的文本选择和取消选择发出事件
文件大小:4KB
文件格式:ZIP
更新时间:2021-06-27 14:31:37
JavaScript 监视器选择 为给定元素的文本选择和取消选择发出事件。 安装 使用安装: $ component install bmcmahen/monitor-text-selection 例子 var el = document . querySelector ( '#text' ) ; var monitor = require ( 'monitor-text-selection' ) ( el ) ; monitor . on ( 'selected' , function ( e , el ) { console . log ( 'selected' ) ; } ) ; monitor . on ( 'deselected' , function ( e , el ) { console . log ( 'deselected' ) ; } ) ; // unbind monit
【文件预览】:
monitor-text-selection-master
----index.js(797B)
----package.json(765B)
----example.html(1KB)
----component.json(449B)
----Readme.md(543B)
----.gitignore(30B)
----History.md(78B)
----Makefile(166B)

网友评论