title: Error "Data provided to an operation does not meet requirements" when adding objects in indexedDB
body: <p>When i try to add the object to the objectStore with .add, the console shows this error:
  <em>DataError: Data provided to an operation does not meet requirements.</em> If someone can tell where this error came from it will really help me. This is the code:</p>
  
  <pre><code>var request = objStore.add({tarea: todo, clase: "pendiente"});
  
  var db;
  
  function create_to_do(){
    var todo = document.querySelector('#the-do').value;
    var transaction = db.transaction("to_do", "readwrite");
    transaction.oncomplete = function(eve){
      console.log("all done¡")
    }
  
    transaction.onerror= function(eve){
      console.log("something went wrong: "+ eve.target.errorCode);
    }; 
  
    var objStore = transaction.objectStore("to_do");
    var request = objStore.add({tarea: todo, clase: "pendiente"});
    request.onsuccess = function(eve){
      console.log("all done¡");
      console.log(eve.target.result);
    };
  }
  
  function indexDB(){
    var request = indexedDB.open('todos', 1);
      request.onsuccess = function (evt) {     
      db = this.result;
      console.log("Database Opened");
    };
  
    request.onerror = function (evt){
      console.log("OpenDB error: " + evt.target.errorCode);
    };
  
    request.onupgradeneeded = function(evt){
      store = evt.currentTarget.result.createObjectStore("to_do", 
                {keyPath: 'id', autoIncrement: true});
      store.createIndex('clase', 'clase', {unique: false});
      console.log("index created");
    };
  }
  </code></pre>