Skip to content

Instantly share code, notes, and snippets.

@xubaiw
Last active March 14, 2022 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xubaiw/efa76a545a94571c6a98a5888ab673e8 to your computer and use it in GitHub Desktop.
Save xubaiw/efa76a545a94571c6a98a5888ab673e8 to your computer and use it in GitHub Desktop.
Brave IndexedDB Test

Steps to Run

  1. Clone this gist git clone https://gist.github.com/efa76a545a94571c6a98a5888ab673e8.git brave-indexeddb-test
  2. Change directory cd brave-indexeddb-test
  3. Run python3 -m http.server from terminal
  4. Open http://localhost:8000 in Brave.
  5. Open Developer Tools > Console
  6. See if there is error.
<html>
<head>
<title>
Brave IndexedDB Test
</title>
<script type="module" src="index.js"></script>
</head>
<body>
<h1>
Brave IndexedDB Test
</h1>
</body>
</html>
const request = indexedDB.open("test-db", 1);
request.onerror = function (event) {
console.error(event);
};
request.onupgradeneeded = function (event) {
let db = event.target.result;
db.createObjectStore("test-objectstore");
console.log(event);
};
request.onsuccess = function (event) {
console.log(event);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment