1. Лучший говнокод

    В номинации:
    За время:
  2. JavaScript / Говнокод #29175

    +1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    /* "[...] To fix this I added a delay at the end of the function and the events
    now fire properly. Thank you for all of your help. Fixed Code:"
    */
    
    data.indexedDB.addSource = function(sourceBlob) {
    //adds source to data base
      var version = 1;
      var request = indexedDB.open("content", version);
      request.onerror = errorHandler;
      request.onsuccess = function(e) {
        db = e.target.result;
        var trans = db.transaction(["nContent"], "readwrite");
        var store = trans.objectStore("nContent");
        var request = store.put(sourceBlob);
        trans.oncomplete = function(e) {
          extron.indexedDB.getIndexedSource();
        };
    
      };
        var token = 100000;
        while(token != 0)
        {
          token = token-1;
    
        }
    };

    https://stackoverflow.com/questions/27494247/why-is-my-indexeddb-open-onsuccess-event-not-called

    ISO, 02 Сентября 2025

    Комментарии (39)