IHM/assets/js/m3d_db.js
/**
 * Create ObjectStore of grammar.
 * @private
 */
Create ObjectStore of grammar.
@private
Create ObjectStore of grammar . @private
function idbCreate_grammar(name) {	
	var request = db.setVersion('1');
	request.onerror = function(e){log("Error: IndexedDB create grammar");};
	request.onsuccess = function(e) {
		if (!db.objectStoreNames.contains('grammar')) {
			try {
				db.createObjectStore('grammar', {keyPath: 'id'});
				log("Object store grammar created");
				var ini='// Game created by 3DWIGS\n// On '+(new Date()).toGMTString()+'\n\ngame has name at "'+name+'";\n';
				M3D.DB.setGrammar(ini);
				M3D.Editor.initDB(ini);
			} catch (err) {
				log("Error: IndexedDB create grammar");
			}
		} else {
			log("Object store grammar already exists");
		}
	}
}
function idbCreate_grammar ( name ) { var request = db . setVersion ( '1' ) ; request . onerror = function ( e ) { log ( "Error: IndexedDB create grammar" ) ; } ; request . onsuccess = function ( e ) { if ( ! db . objectStoreNames . contains ( 'grammar' ) ) { try { db . createObjectStore ( 'grammar' , { keyPath : 'id' } ) ; log ( "Object store grammar created" ) ; var ini = '// Game created by 3DWIGS\n// On ' + ( new Date ( ) ) . toGMTString ( ) + '\n\ngame has name at "' + name + '";\n' ; M3D . DB . setGrammar ( ini ) ; M3D . Editor . initDB ( ini ) ; } catch ( err ) { log ( "Error: IndexedDB create grammar" ) ; } } else { log ( "Object store grammar already exists" ) ; } } }
Create ObjectStore of grammar.
Create ObjectStore of grammar .
// grammar 
