"numeric transaction modes are deprecated in idbdatabase.transaction. use "readonly" or "readwrite"" Code Answer

1

the indexeddb standard is still a work in progress (although version 1 is very close to finished), and one of the recent changes was switching from the numeric constants like "idbtransaction.read_write" to just plain strings like "readwrite". it's a good idea because it makes code more concise and more readable.

the old constants will likely continue to work for some time, albeit with a warning message like you observed, but using the strings is the "correct" way to do it now and that's probably what you should use, like:

    var trans = db.transaction([key], "readwrite");
By ssemilla on September 16 2022

Answers related to “numeric transaction modes are deprecated in idbdatabase.transaction. use "readonly" or "readwrite"”

Only authorized users can answer the Search term. Please sign in first, or register a free account.