Skip to content

Commit

Permalink
[w] (2) Allow openDatabase() to have a display name and estimated size.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@1094 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 24, 2007
1 parent 65ef97d commit 7aa8804
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
13 changes: 11 additions & 2 deletions index
Expand Up @@ -24707,7 +24707,7 @@ never reset. This is nice and consistent.)
readonly attribute <a href="#clientinformation">ClientInformation</a> <a href="#navigator" title=dom-navigator>navigator</a>; <!-- XXX IE6 also has window.clientInformation pointing to this same object -->
readonly attribute <a href="#storage2">Storage</a> <a href="#sessionstorage" title=dom-sessionStorage>sessionStorage</a>;
readonly attribute <a href="#storagelist">StorageList</a> <a href="#globalstorage" title=dom-globalStorage>globalStorage</a>;
<a href="#database0">Database</a> <a href="#opendatabase" title=dom-opendatabase>openDatabase</a>(in DOMString name, in DOMString version);
<a href="#database0">Database</a> <a href="#opendatabase" title=dom-opendatabase>openDatabase</a>(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize);

// modal user prompts
void <a href="#alert" title=dom-alert>alert</a>(in DOMString message);
Expand Down Expand Up @@ -30417,7 +30417,9 @@ have a variable and unknownable number of literals coming:
<p>The <dfn id=opendatabase
title=dom-opendatabase><code>openDatabase()</code></dfn> method returns a
<code><a href="#database0">Database</a></code> object. The method takes
two arguments, a database name and a database version.
four arguments: a database name, a database version, a display name, and
an estimated size, in bytes, of the data that will be stored in the
database.

<p>If the database version provided is not the empty string, and the
database already exists but has a different version, then the method must
Expand All @@ -30442,6 +30444,13 @@ have a variable and unknownable number of literals coming:
only support a subset of all strings as database names by mapping database
names (e.g. using a hashing algorithm) to the supported set of names.

<p>User agents are expected to use the display name and the estimated
database size to optimise the user experience. For example, a user agent
could use the estimated size to suggest an initial quota to the user. This
allows a site that is aware that it will try to use hundreds of megabytes
to declare this upfront, instead of the user agent prompting the user for
permission to increase the quota every five megabytes.

<pre class=idl>interface <dfn id=database0>Database</dfn> {
readonly attribute DOMString <a href="#version" title=dom-database-version>version</a>;
void <a href="#changeversion" title=dom-database-changeVersion>changeVersion</a>(in DOMString oldVersion, in DOMString newVersion);
Expand Down
16 changes: 13 additions & 3 deletions source
Expand Up @@ -22267,7 +22267,7 @@ never reset. This is nice and consistent.)
readonly attribute <span>ClientInformation</span> <span title="dom-navigator">navigator</span>; <!-- XXX IE6 also has window.clientInformation pointing to this same object -->
readonly attribute <span>Storage</span> <span title="dom-sessionStorage">sessionStorage</span>;
readonly attribute <span>StorageList</span> <span title="dom-globalStorage">globalStorage</span>;
<span>Database</span> <span title="dom-opendatabase">openDatabase</span>(in DOMString name, in DOMString version);
<span>Database</span> <span title="dom-opendatabase">openDatabase</span>(in DOMString name, in DOMString version, in DOMString displayName, in unsigned long estimatedSize);

// modal user prompts
void <span title="dom-alert">alert</span>(in DOMString message);
Expand Down Expand Up @@ -28005,8 +28005,10 @@ have a variable and unknownable number of literals coming:

<p>The <dfn
title="dom-opendatabase"><code>openDatabase()</code></dfn> method
returns a <code>Database</code> object. The method takes two
arguments, a database name and a database version.</p>
returns a <code>Database</code> object. The method takes four
arguments: a database name, a database version, a display name, and
an estimated size, in bytes, of the data that will be stored in the
database.</p>

<p>If the database version provided is not the empty string, and the
database already exists but has a different version, then the method
Expand All @@ -28032,6 +28034,14 @@ have a variable and unknownable number of literals coming:
names by mapping database names (e.g. using a hashing algorithm) to
the supported set of names.</p>

<p>User agents are expected to use the display name and the
estimated database size to optimise the user experience. For
example, a user agent could use the estimated size to suggest an
initial quota to the user. This allows a site that is aware that it
will try to use hundreds of megabytes to declare this upfront,
instead of the user agent prompting the user for permission to
increase the quota every five megabytes.</p>

<pre class="idl">interface <dfn>Database</dfn> {
readonly attribute DOMString <span title="dom-database-version">version</span>;
void <span title="dom-database-changeVersion">changeVersion</span>(in DOMString oldVersion, in DOMString newVersion);
Expand Down

0 comments on commit 7aa8804

Please sign in to comment.