lib/packages/core-classes.js
function(element, position) {

		if (this._is_inDOM) Lava.t("inject: widget is already in DOM");
		if (Lava.schema.DEBUG && this._parent_view) Lava.t("Widget: only top-level widgets can be inserted into DOM");
		if (Lava.schema.DEBUG && !this._container) Lava.t("Widget: root widgets must have a container");

		// Otherwise, if you assign data to a widget, that was removed from DOM,
		// and then render it - it will render with old data.
		Lava.ScopeManager.refresh();

		// lock, cause render operation can change data. Although it's not recommended to change data in render().
		Lava.ScopeManager.lock();
		Firestorm.DOM.insertHTML(element, this.render(), position || 'Top');
		Lava.ScopeManager.unlock();
		this.broadcastInDOM();

	}
function(element, position) {

		if (this._is_inDOM) Lava.t("inject: widget is already in DOM");
		if (Lava.schema.DEBUG && this._parent_view) Lava.t("Widget: only top-level widgets can be inserted into DOM");
		if (Lava.schema.DEBUG && !this._container) Lava.t("Widget: root widgets must have a container");

		// Otherwise, if you assign data to a widget, that was removed from DOM,
		// and then render it - it will render with old data.
		Lava.ScopeManager.refresh();

		// lock, cause render operation can change data. Although it's not recommended to change data in render().
		Lava.ScopeManager.lock();
		Firestorm.DOM.insertHTML(element, this.render(), position || 'Top');
		Lava.ScopeManager.unlock();
		this.broadcastInDOM();

	}
function ( element , position ) { if ( this . _is_inDOM ) Lava . t ( "inject: widget is already in DOM" ) ; if ( Lava . schema . DEBUG && this . _parent_view ) Lava . t ( "Widget: only top-level widgets can be inserted into DOM" ) ; if ( Lava . schema . DEBUG && ! this . _container ) Lava . t ( "Widget: root widgets must have a container" ) ; // Otherwise, if you assign data to a widget, that was removed from DOM, // and then render it - it will render with old data. Lava . ScopeManager . refresh ( ) ; // lock, cause render operation can change data. Although it's not recommended to change data in render(). Lava . ScopeManager . lock ( ) ; Firestorm . DOM . insertHTML ( element , this . render ( ) , position || 'Top' ) ; Lava . ScopeManager . unlock ( ) ; this . broadcastInDOM ( ) ; }
Render and insert the widget instance into DOM
@param {HTMLElement} element
@param {_eInsertPosition} position
Render and insert the widget instance into DOM