IHTMLStorageList::namedItem Method

New for Windows Internet Explorer 8

Note: This documentation is preliminary and is subject to change.

Retrieves a storage area from the collection, by name.

Syntax

HRESULT namedItem(      
    BSTR bstrDomain,
    IHTMLStorage **p
);

Parameters

  • bstrDomain
    [in] The domain name of origin.
  • p
    [out, retval] Address of a variable of type IHTMLStorage that receives the named item.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

If the browser has not allocated a global storage area for the specified bstrDomain in the current browsing context, a new storage area for that origin is created.

Each domain and subdomain has its own separate global storage area. Subdomains can access the storage areas of parent domains, and domains can access the storage areas of subdomains. For example, globalStorage['example.com'] is accessible to example.com and any of its subdomains. In reverse, globalStorage['www.example.com'] is accessible to example.com, but not other subdomains, such as mail.example.com.

See Also

IHTMLWindow6::globalStorage