<commit_before>interface Window {
	cordova : any
}

namespace $ {

	/// Autoattach view roots to loaded DOM.
	$mol_dom_context.document.addEventListener( window.cordova ? 'deviceready' : 'DOMContentLoaded' , event => {
			
		const nodes = $mol_dom_context.document.querySelectorAll( '[mol_view_root]' )
		
		for( let i = nodes.length - 1 ; i >= 0 ; --i ) {
			let view = (<any>$)[ nodes.item( i ).getAttribute( 'mol_view_root' ) ].Root( i )
			$mol_view_dom.mount( view , nodes.item( i ) )
			let win = new $mol_atom( `$mol_view.Root(${ i })` , ()=> {
				view.render()
				$mol_dom_context.document.title = view.title()
				return null
			} )
			new $mol_defer( ()=> win.get() )
		}
		
		$mol_defer.run()
	} )
	
}
<commit_msg>User friendly error about not existent view class.<commit_after>interface Window {
	cordova : any
}

namespace $ {

	/// Autoattach view roots to loaded DOM.
	$mol_dom_context.document.addEventListener( window.cordova ? 'deviceready' : 'DOMContentLoaded' , event => {
			
		const nodes = $mol_dom_context.document.querySelectorAll( '[mol_view_root]' )
		
		for( let i = nodes.length - 1 ; i >= 0 ; --i ) {
			const name = nodes.item( i ).getAttribute( 'mol_view_root' )
			
			const View = $[ name ]
			if( !View ) {
				console.error( `Can not attach view. Class not found: ${ name }` )
				continue
			}
			
			const view = View.Root( i )
			
			$mol_view_dom.mount( view , nodes.item( i ) )
			
			let win = new $mol_atom( `$mol_view.Root(${ i })` , ()=> {
				view.render()
				$mol_dom_context.document.title = view.title()
				return null
			} )
			
			new $mol_defer( ()=> win.get() )
		}
		
		$mol_defer.run()
	} )
	
}

{'fraction_non_alphanumeric': 0.15840386940749698, 'fraction_numerical': 0.0024183796856106408, 'mean_word_length': 2.8941176470588235, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5348928', 'n_tokens_mistral': 703, 'n_tokens_neox': 581, 'n_words': 135}