lib/packages/core-classes.js
function(widget_config, unknown_attributes, resource_name) {

		var value = {
				type: 'container_stack',
				value: []
			},
			operations_stack = value.value;

		if (!widget_config.resources) {

			widget_config.resources = {};

		}

		if (!widget_config.resources['default']) {

			widget_config.resources['default'] = {};

		}

		if ('class' in unknown_attributes) {

			operations_stack.push({
				name: 'add_classes',
				value: unknown_attributes['class'].trim().split(/\s+/)
			});
			delete unknown_attributes['class'];

		}

		if ('style' in unknown_attributes) {

			operations_stack.push({
				name: 'add_styles',
				value: Lava.parsers.Common.parseStyleAttribute(unknown_attributes.style)
			});
			delete  unknown_attributes.style;

		}

		if (!Firestorm.Object.isEmpty(unknown_attributes)) {

			operations_stack.push({
				name: 'add_properties',
				value: Firestorm.Object.copy(unknown_attributes) // copying to reduce possible slowdowns (object may contain deleted values)
			});

		}

		Lava.resources.putResourceValue(widget_config.resources['default'], resource_name, value);

	}
function(widget_config, unknown_attributes, resource_name) {

		var value = {
				type: 'container_stack',
				value: []
			},
			operations_stack = value.value;

		if (!widget_config.resources) {

			widget_config.resources = {};

		}

		if (!widget_config.resources['default']) {

			widget_config.resources['default'] = {};

		}

		if ('class' in unknown_attributes) {

			operations_stack.push({
				name: 'add_classes',
				value: unknown_attributes['class'].trim().split(/\s+/)
			});
			delete unknown_attributes['class'];

		}

		if ('style' in unknown_attributes) {

			operations_stack.push({
				name: 'add_styles',
				value: Lava.parsers.Common.parseStyleAttribute(unknown_attributes.style)
			});
			delete  unknown_attributes.style;

		}

		if (!Firestorm.Object.isEmpty(unknown_attributes)) {

			operations_stack.push({
				name: 'add_properties',
				value: Firestorm.Object.copy(unknown_attributes) // copying to reduce possible slowdowns (object may contain deleted values)
			});

		}

		Lava.resources.putResourceValue(widget_config.resources['default'], resource_name, value);

	}
function ( widget_config , unknown_attributes , resource_name ) { var value = { type : 'container_stack' , value : [ ] } , operations_stack = value . value ; if ( ! widget_config . resources ) { widget_config . resources = { } ; } if ( ! widget_config . resources [ 'default' ] ) { widget_config . resources [ 'default' ] = { } ; } if ( 'class' in unknown_attributes ) { operations_stack . push ( { name : 'add_classes' , value : unknown_attributes [ 'class' ] . trim ( ) . split ( / \s+ / ) } ) ; delete unknown_attributes [ 'class' ] ; } if ( 'style' in unknown_attributes ) { operations_stack . push ( { name : 'add_styles' , value : Lava . parsers . Common . parseStyleAttribute ( unknown_attributes . style ) } ) ; delete unknown_attributes . style ; } if ( ! Firestorm . Object . isEmpty ( unknown_attributes ) ) { operations_stack . push ( { name : 'add_properties' , value : Firestorm . Object . copy ( unknown_attributes ) // copying to reduce possible slowdowns (object may contain deleted values) } ) ; } Lava . resources . putResourceValue ( widget_config . resources [ 'default' ] , resource_name , value ) ; }
Store root attributes that are not described in Sugar config as 'container_stack' resource
@param {_cWidget} widget_config
@param {Object} unknown_attributes
@param {string} resource_name
Store root attributes that are not described in Sugar config as container_stack resource