KV Storage, the Web’s First Built-In Module
Chrome is experimenting with a new feature called built-in modules, and the first one we’re planning to ship is an asynchronous key/value storage module called KV Storage
But before I get into the details of the KV Storage module, let me explain what I mean by built-in modules. For example, in supported browsers, you could import the KV Storage module with the following code (see below for how to use a KV Storage polyfill in unsupported browsers):
The KV Storage module is similar in its simplicity to the API, but its API shape is actually closer to a JavaScript . Here’s an example of how to use the KV Storage module in your code:
If you’re familiar with using native JavaScript modules in browsers, you probably know that (at least up until now) importing anything other than a URL will generate an error.
Source: developers.google.com