[html5] r1094 - /
whatwg at whatwg.org
whatwg at whatwg.org
Wed Oct 24 16:11:07 PDT 2007
Author: ianh
Date: 2007-10-24 16:11:05 -0700 (Wed, 24 Oct 2007)
New Revision: 1094
Modified:
index
source
Log:
[w] (2) Allow openDatabase() to have a display name and estimated size.
Modified: index
===================================================================
--- index 2007-10-24 11:24:13 UTC (rev 1093)
+++ index 2007-10-24 23:11:05 UTC (rev 1094)
@@ -24707,7 +24707,7 @@
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);
@@ -30417,7 +30417,9 @@
<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
@@ -30442,6 +30444,13 @@
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);
Modified: source
===================================================================
--- source 2007-10-24 11:24:13 UTC (rev 1093)
+++ source 2007-10-24 23:11:05 UTC (rev 1094)
@@ -22267,7 +22267,7 @@
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);
@@ -28005,8 +28005,10 @@
<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
@@ -28032,6 +28034,14 @@
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);
More information about the Commit-Watchers
mailing list