IndexedDB – Promise Wrapper Promises, like callbacks, are a technique of telling what you want your code to perform once an asynchronous operation completes without stopping the runtime’s thread of javascript. Instead of supplying a callback to an asynchronous function to run after it completes, promises can be used instead. Promise library was created by […]
IndexedDB – Ranges When we don’t want to get all the data at once we use ranges. When we want to get data in a specific range only we use ranges. We define the range using the IDBKeyRange object. This object has 4 methods which are − upperBound() lowerBound() bound() only() Syntax IDBKeyRange.lowerBound(indexKey); IDBKeyRange.upperBound(indexKey); IDBKeyRange.bound(lowerIndexKey, […]
IndexedDB – ECMAScript Binding Firstly, what is ECMAScript? ECMAScript (European Computer Manufacturers Association Script) is a scripting language based on JavaScript. JavaScript ES6 adds new syntaxes and features so that the code is more easily readable and we can write less code for the same functionality. ES6 has many new features like arrow functions, template […]