jquery.bind + indexeddb-request.onsuccess crashing my website.

Description:

I've a function that gets the records from the indexedDB. When it is called by binding the function call to an element using 'jquery.click' it is working fine, but when I bind the same element using 'jquery.bind' it crashes the webapp. When debugging I found that app crashes on request.onsuccess event.

Platform: Ipad (iOs version 10 & above) , Safari browser

Problem: 'jquery.bind' is not working.

Scenarios I tried:

  1. I tried by binding the element without calling the indexedDB related function - worked fine
  2. I tried in Windows Tab - worked fine
  3. using jquery.click - worked fine
  4. While binding the element using jquery.bind - crashes the webapp

Example:

$('#ABC').bind('click', function(e) { 
var transaction = db.transaction(['Table1'],'readonly');
var objStore = transaction.objectStore('Table1');
  var request = objStore.getAll()
  request.onsuccess = function (event) { console.log(event); })

})

In the above scenario, the app crashes when the event is fired but if we use jquery.click, then it works fine.

Please help.

jquery.bind + indexeddb-request.onsuccess crashing my website.
 
 
Q