HTML5 Study Notes

Source: Internet
Author: User

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



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.