【文件属性】:
文件名称:lifecycle-events:为 DOM 元素启用生命周期事件
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-07 08:44:14
JavaScript
生命周期事件
为 HTML 元素启用生命周期事件: attached 、 detached 。
用法
$ npm install lifecycle-events var lifecycleEvents = require ( 'lifecycle-events' ) ;
//enable lifecycle events for all elements on the page
lifecycleEvents . enable ( ) ;
$ ( '.my-element' ) . on ( 'attached' , function ( ) { } ) ;
$ ( '.my-other-element' ) . on ( 'detached' , function ( ) { } ) ;
//Disable all lifecycle events
lifecycleE
【文件预览】:
lifecycle-events-master
----package.json(717B)
----index.js(4KB)
----UNLICENSE(1KB)
----README.md(2KB)
----test()
--------index.html(2KB)