nl_tokens: Add events that will trigger the state to be saved . If the first argument is an array each element of that array is the name of a state event . Otherwise each argument passed to this method is the name of a state event .
pl_tokens: function ( events ) { var me = this , i , event , stateEventsByName ; if ( <mask> . stateful && me . getStateId ( ) ) { if ( typeof events == 'string' ) { events = Array . prototype . slice . call ( arguments , 0 ) ; } stateEventsByName = me . stateEventsByName || ( me . stateEventsByName = { } ) ; for ( i = events . length ; i -- ; ) { event = events [ i ] ; if ( ! stateEventsByName [ event ] ) { stateEventsByName [ event ] = 1 ; me . on ( event , me . onStateChange , me ) ; } } } }