HTML and CSS Reference
In-Depth Information
B.1.5. Microdata API
The Microdata API ( table B.12 ) has one method on the document object and a couple
of DOM attributes on elements that have Microdata content attributes ( itemscope and
itemprop ).
Table B.12. Microdata API
Returns a list of top-level Microdata items. If you're looking for a particular type of Mi-
crodata item, such as event items, you can select all event items by specifying 'ht-
tp://' as the type parameter. Multiple types can
be specified in a space-separated list.
Gets the element's attributes (only if it has an itemscope attribute).
Gets or sets the element's Microdata item value (only if it has an itemprop attribute).
B.1.6. APIs for Web Storage
Web Storage defines APIs on two objects, window.localStorage and
window.session-Storage ; see table B.13 . The APIs for both of these objects are
Table B.13. localStorage and sessionStorage API
Number of items (key/value pairs) currently stored in the storage area.
Gets the name of the key at the given index.
Gets the value of the item at the given key.
setItem(key, value)
Sets the value of the item at the given key to the value provided.
Removes the item at the given key.
Removes all items in the storage area.
Web Storage also defines an event, storage , that fires when the storage area changes.
This event returns a storage event object, which contains attributes to determine what
changed; see table B.14 .
Search WWH ::

Custom Search