Re: Resending Re: WebStorage and WebDatabase - creation and exceptions

On Aug 31, 2009, at 11:07 AM, Nikunj R. Mehta wrote:
>
> In WebDatabase:
> 
> The user agent may raise a SECURITY_ERR exception instead of returning a 
> Database object if the request violates a policy decision (e.g. if the 
> user agent is configured to not allow the page to open databases).
> 
> In WebStorage (emphasis mine):
> 
> When a new HTMLDocument is created, the user agent must check to see if 
> the document's top-level browsing context has allocated a session 
> storage area for that document's origin. If it has not, a new storage 
> area for that document's origin must be created.
> 
> When the localStorage attribute is accessed, the user agent must check 
> to see if it has allocated a local storage area for the origin of the 
> Document of the Window object on which the method was invoked. If it has 
> not, a new storage area for that origin must be created.
> 
> A browser may not allow local storage for a certain origin, just like it 
> may not allow cookies to be stored. What is the expected behavior in 
> that case?

Under setItem(), the Web Storage spec says:

# If it couldn't set the new value, the method must raise an 
# QUOTA_EXCEEDED_ERR exception. (Setting could fail if, e.g., the user has 
# disabled storage for the site, or if the quota has been exceeded.)

HTH,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
 

Received on Tuesday, 13 October 2009 05:35:55 UTC