nl_tokens: Adds a name to the list of data attributes which are used and managed by Backbone . Declarative . Views . The name must be passed without the data - prefix but written as in the data attribute ( ie tag - name not tagName ) .
pl_tokens: function _registerDataAttribute ( name , options ) { var existingNames = _getRegisteredDataAttributeNames ( ) , fullName = "data-" + name , type = options && options . isJSON ? "json" : "primitives" , names = registeredDataAttributes [ type ] ; if ( name . indexOf ( "data-" ) === 0 ) throw new CustomizationError ( 'registerDataAttribute(): Illegal attribute name "' + name + '", must be registered without "data-" prefix' ) ; if ( name === "html" || name === "compiled" ) throw new CustomizationError ( 'registerDataAttribute(): Cannot register attribute name "' + name + '" because it is reserved' ) ; if ( _ . contains ( existingNames , name ) ) throw new CustomizationError ( 'registerDataAttribute(): Cannot register attribute name "' + <mask> + '" because it has already been registered' ) ; // Add the name to the list of registered data attributes names . push ( name ) ; registeredDataAttributes [ type ] = _ . uniq ( names ) ; // Create amd store a regex matching the attribute and its value in an HTML/template string, for transfer onto a // wrapper node (see _wrapRawTemplate()) rxRegisteredDataAttributes [ fullName ] = new RegExp ( fullName + "\\s*=\\s*(['\"])([\\s\\S]+?)\\1" ) ; // Update the regular expression which tests an HTML/template string and detects a comment containing registered // attributes. rxElDefinitionComment = _createElDefinitionCommentRx ( ) ; }