I wonder we should remove this.onsuccess and this.onerror here....?
The reason is if error has occured, onsuccess shouldn't be triggered. And any of them should only be triggered once.