From 39f2114f9797eb51994966c6bb8ff1814c9a4da8 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:36:08 +0100 Subject: unslug fr: move --- .../api/idbopendbrequest/blocked_event/index.html | 102 +++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 files/fr/web/api/idbopendbrequest/blocked_event/index.html (limited to 'files/fr/web/api/idbopendbrequest') diff --git a/files/fr/web/api/idbopendbrequest/blocked_event/index.html b/files/fr/web/api/idbopendbrequest/blocked_event/index.html new file mode 100644 index 0000000000..e3fdfdfb83 --- /dev/null +++ b/files/fr/web/api/idbopendbrequest/blocked_event/index.html @@ -0,0 +1,102 @@ +--- +title: blocked +slug: Web/API/IDBRequest/blocked_event +translation_of: Web/API/IDBOpenDBRequest/blocked_event +--- +

Le handler blocked est exécuté lorsque l'ouverture d'une connexion à une base de données bloque une transaction versionchange sur celle-ci.

+ +

Informations générales

+ +
+
Spécification
+
IndexedDB
+
Interface
+
IDBVersionChangeEvent
+
Propagation
+
Non
+
Annulable
+
Non
+
Cible
+
IDBRequest
+
Action par défaut
+
Aucune
+
+ +

Propriétés

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDescription
target {{readonlyInline}}{{domxref("EventTarget")}}The request concerned by this event.
type {{readonlyInline}}{{domxref("DOMString")}}The type of event.
bubbles {{readonlyInline}}{{jsxref("Boolean")}}Whether the event normally bubbles or not.
cancelable {{readonlyInline}}{{jsxref("Boolean")}}Whether the event is cancellable or not.
newVersion {{readonlyInline}}unsigned long (int)The new version of the database.
oldVersion {{readonlyInline}}unsigned long (int)The old version of the database.
+ +

Exemple

+ +
var req1 = indexedDB.open("addressbook", 3);
+
+req1.onsuccess = function( event ) {
+  var addressbookDB = event.target.result;
+
+  // Essayons d'ouvrir la même base de données avec une version de révision plus élevée
+  var req2 = indexedDB.open("addressbook", 4);
+
+  // Dans ce cas, le handler onblocked sera exécuté
+  req2.onblocked = function( e ) {
+    console.log(e)
+  };
+
+};
+ +

Evénements liés

+ + + +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf