public/assets/js/idb.js
// This function will be executed if we attempt to submit a new pizza and there's no internet connection
This function will be executed if we attempt to submit a new pizza and there's no internet connection
This function will be executed if we attempt to submit a new pizza and there ' s no internet connection
function saveRecord(record) {
	const transaction = db.transaction([ 'new_pizza' ], 'readwrite');
	const pizzaObjectStore = transaction.objectStore('new_pizza');
	pizzaObjectStore.add(record);
}
function saveRecord ( record ) { const transaction = db . transaction ( [ 'new_pizza' ] , 'readwrite' ) ; const pizzaObjectStore = transaction . objectStore ( 'new_pizza' ) ; pizzaObjectStore . add ( record ) ; }
This function will be executed if we attempt to submit a new pizza and there's no internet connection
This function will be executed if we attempt to submit a new pizza and there ' s no internet connection
// open a new transaction with the database with read and write permissions // access the object store for 'new_pizza' // add record to your store with add method