lib/packages/core.js
function(script_element) {

		var widget,
			config,
			constructor,
			id = Firestorm.Element.getProperty(script_element, 'id'),
			class_name = Firestorm.Element.getProperty(script_element, 'lava-app');

		config = {
			type: 'widget',
			is_extended: true,
			template: null,
			container: {type: 'Morph'}
		};
		config.template = Lava.TemplateParser.parse(Firestorm.Element.getProperty(script_element, 'html'), config);

		if (id) {
			config.id = id;
			Firestorm.Element.removeProperty(script_element, 'id');
		}

		constructor = Lava.ClassManager.getConstructor(class_name || 'Lava.widget.Standard', 'Lava.widget');
		if (Lava.schema.DEBUG && !constructor) Lava.t('Class not found: ' + class_name);
		widget = /** @type {Lava.widget.Standard} */ new constructor(config);
		widget.inject(script_element, 'After');
		Firestorm.Element.destroy(script_element);
		return widget;

	}
function(script_element) {

		var widget,
			config,
			constructor,
			id = Firestorm.Element.getProperty(script_element, 'id'),
			class_name = Firestorm.Element.getProperty(script_element, 'lava-app');

		config = {
			type: 'widget',
			is_extended: true,
			template: null,
			container: {type: 'Morph'}
		};
		config.template = Lava.TemplateParser.parse(Firestorm.Element.getProperty(script_element, 'html'), config);

		if (id) {
			config.id = id;
			Firestorm.Element.removeProperty(script_element, 'id');
		}

		constructor = Lava.ClassManager.getConstructor(class_name || 'Lava.widget.Standard', 'Lava.widget');
		if (Lava.schema.DEBUG && !constructor) Lava.t('Class not found: ' + class_name);
		widget = /** @type {Lava.widget.Standard} */ new constructor(config);
		widget.inject(script_element, 'After');
		Firestorm.Element.destroy(script_element);
		return widget;

	}
function ( script_element ) { var widget , config , constructor , id = Firestorm . Element . getProperty ( script_element , 'id' ) , class_name = Firestorm . Element . getProperty ( script_element , 'lava-app' ) ; config = { type : 'widget' , is_extended : true , template : null , container : { type : 'Morph' } } ; config . template = Lava . TemplateParser . parse ( Firestorm . Element . getProperty ( script_element , 'html' ) , config ) ; if ( id ) { config . id = id ; Firestorm . Element . removeProperty ( script_element , 'id' ) ; } constructor = Lava . ClassManager . getConstructor ( class_name || 'Lava.widget.Standard' , 'Lava.widget' ) ; if ( Lava . schema . DEBUG && ! constructor ) Lava . t ( 'Class not found: ' + class_name ) ; widget = /** @type {Lava.widget.Standard} */ new constructor ( config ) ; widget . inject ( script_element , 'After' ) ; Firestorm . Element . destroy ( script_element ) ; return widget ; }
Convert a script DOM element to widget instance
@param {HTMLElement} script_element
@returns {Lava.widget.Standard}
Convert a script DOM element to widget instance