HTML5 Study Notes
When I recently read the HTML5 and CSS3 authoritative guide by Lu lingniu, I found that some of the attributes are outdated. The following are some conclusions:
1. IndexedDB Database Transaction IDBTransaction:
1) read-only transaction (IDBTransaction. READ_ONLY)
2) read/write (DBTransaction. READ_WRITE)
In actual development, this call is incorrect, for example:
Var tx = idb. transaction ([storeName], IDBTransaction. READ_ONLY) or
Var tx = idb. transaction ([storeName], IDBTransaction. READ_WRITE)
Correct syntax:
Var tx = idb. transaction ([storeName], "readonly") or
Var tx = idb. transaction ([storeName], "readwrite ")
2. The BlobBuilder object has been discarded.
var oBuilder = new BlobBuilder();var aFileParts = ["hey!<\/b><\/a>"];oBuilder.append(aFileParts[0]);var oMyBlob = oBuilder.getBlob("text\/xml"); // the blob
It can be written as follows:var aFileParts = ["hey!<\/b><\/a>"];var oMyBlob = new Blob(aFileParts, { "type" : "text\/xml" }); // the blob
Details can be queried: Blob