nl_tokens: 为HTML元素添加事件监听
pl_tokens: function addEvent ( <mask> , type , handler ) { var once = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : false ; var capture = arguments . length > 4 && arguments [ 4 ] !== undefined ? arguments [ 4 ] : false ; if ( capture !== undefined && ! isBoolean ( capture ) && supportsPassive ) { capture = { passive : true } ; } if ( once ) { var oldHandler = handler ; handler = function ( ) { return function ( ) { for ( var _len = arguments . length , args = Array ( _len ) , _key = 0 ; _key < _len ; _key ++ ) { args [ _key ] = arguments [ _key ] ; } oldHandler . apply ( this , args ) ; removeEvent ( el , type , handler , once , capture ) ; } ; } ( ) ; /* 将包装后的方法记录到缓存中 */ addEventCache ( el , type + '_once' , oldHandler , handler ) ; } el . addEventListener ( type , handler , capture ) ; }