Why is db.transaction not working with indexeddb?

后端 未结 2 741
情话喂你
情话喂你 2020-12-20 22:01

I am new at using inxededdb and am trying to get data out of a store. The store contains data, but for some reason the code stops after trying to set the var tx. If I am mis

相关标签:
2条回答
  • 2020-12-20 22:17

    The problem is probably your db variable. You are probably accessing a closed or null instance of a connection object.

    Try instead to create the db connection right inside the function. Do NOT use a global db variable.

    0 讨论(0)
  • 2020-12-20 22:29

    index.get yields primary key. You have to get record value using the resulting primary key.

    0 讨论(0)
提交回复
热议问题