| 1 |
apache |
1.2 |
|
| 2 |
|
|
|
| 3 |
|
|
#pattern |
| 4 |
|
|
<span class=secno>* </span>The * event |
| 5 |
|
|
#ja |
| 6 |
apache |
1.3 |
<span class=secno>$1 </span>$2 事象 |
| 7 |
|
|
|
| 8 |
|
|
#en |
| 9 |
|
|
The <dfn id=storage1 title=event-storage><code>storage</code></dfn>
|
| 10 |
|
|
event is fired in an <code><a href="#htmldocument">HTMLDocument</a></code>
|
| 11 |
|
|
when a storage area changes, as described in the previous two sections (<a
|
| 12 |
|
|
href="#sessionStorageEvent">for session storage</a>, <a
|
| 13 |
|
|
href="#localStorageEvent">for local storage</a>). |
| 14 |
|
|
#ja |
| 15 |
|
|
<dfn id=storage1 title=event-storage><code>storage</code></dfn>
|
| 16 |
|
|
事象は、 <code><a href="#htmldocument">HTMLDocument</a></code>
|
| 17 |
|
|
において、ストレージ領域が変化した時に。前の2つの節
|
| 18 |
|
|
(<a
|
| 19 |
|
|
href="#sessionStorageEvent">セッション・ストレージ対象</a>、<a
|
| 20 |
|
|
href="#localStorageEvent">局所ストレージ対象</a>)
|
| 21 |
|
|
で説明したように発火されます。
|
| 22 |
apache |
1.4 |
|
| 23 |
|
|
|
| 24 |
|
|
#en |
| 25 |
|
|
When this happens, the user agent must dispatch an event with the name
|
| 26 |
|
|
<code><a href="#storage0">storage</a></code>, with no namespace, which
|
| 27 |
|
|
does not bubble but is cancelable, and which uses the <code><a
|
| 28 |
|
|
href="#storageevent">StorageEvent</a></code>, at <a href="#the-body1">the
|
| 29 |
|
|
body element</a> of each <a href="#active" title="active
|
| 30 |
|
|
document">active</a> <code><a href="#htmldocument">HTMLDocument</a></code>
|
| 31 |
|
|
object affected. |
| 32 |
|
|
#ja |
| 33 |
|
|
利用者エージェントは、これが起こる時、名前
|
| 34 |
|
|
<code><a href="#storage0">storage</a></code>、
|
| 35 |
|
|
名前空間なし、
|
| 36 |
|
|
泡立たず取消し可能で <code><a
|
| 37 |
|
|
href="#storageevent">StorageEvent</a></code>
|
| 38 |
|
|
を使った事象を、関係する<a href="#active" title="active
|
| 39 |
|
|
document">活性</a> <code><a href="#htmldocument">HTMLDocument</a></code>
|
| 40 |
|
|
オブジェクトそれぞれの<a href="#the-body1">文書
|
| 41 |
|
|
body 要素</a>に対して発送しなければ[[MUST:なりません]]。
|
| 42 |
apache |
1.5 |
|
| 43 |
|
|
|
| 44 |
|
|
#pattern |
| 45 |
|
|
<span class=secno>* </span>Event definition |
| 46 |
|
|
#ja |
| 47 |
apache |
1.6 |
<span class=secno>$1 </span>事象定義 |
| 48 |
|
|
|
| 49 |
|
|
#en |
| 50 |
|
|
The <dfn id=initstorageevent
|
| 51 |
|
|
title=dom-StorageEvent-initStorageEvent><code>initStorageEvent()</code></dfn>
|
| 52 |
|
|
and <dfn id=initstorageeventns
|
| 53 |
|
|
title=dom-StorageEvent-initStorageEventNS><code>initStorageEventNS()</code></dfn>
|
| 54 |
|
|
methods must initialise the event in a manner analogous to the
|
| 55 |
|
|
similarly-named methods in the DOM3 Events interfaces. <a
|
| 56 |
|
|
href="#refsDOM3EVENTS">[DOM3EVENTS]</a> |
| 57 |
|
|
#ja |
| 58 |
|
|
<dfn id=initstorageevent
|
| 59 |
|
|
title=dom-StorageEvent-initStorageEvent><code>initStorageEvent()</code></dfn>
|
| 60 |
|
|
メソッドと <dfn id=initstorageeventns
|
| 61 |
|
|
title=dom-StorageEvent-initStorageEventNS><code>initStorageEventNS()</code></dfn>
|
| 62 |
|
|
メソッドは、 DOM3 事象界面の同じような名前のメソッドと同じような方法で、
|
| 63 |
|
|
事象を初期化しなければ[[MUST:なりません]]。
|
| 64 |
apache |
1.7 |
|
| 65 |
|
|
|
| 66 |
|
|
#en |
| 67 |
|
|
The <dfn id=key title=dom-StorageEvent-key><code>key</code></dfn>
|
| 68 |
|
|
attribute represents the key being changed. |
| 69 |
|
|
#ja |
| 70 |
|
|
<dfn id=key title=dom-StorageEvent-key><code>key</code></dfn>
|
| 71 |
|
|
属性は、変化する鍵を表します。
|
| 72 |
apache |
1.8 |
|
| 73 |
|
|
|
| 74 |
|
|
#en |
| 75 |
|
|
The <dfn id=oldvalue
|
| 76 |
|
|
title=dom-StorageEvent-oldValue><code>oldValue</code></dfn> attribute
|
| 77 |
|
|
represents the old value of the key being changed. |
| 78 |
|
|
#ja |
| 79 |
|
|
<dfn id=oldvalue
|
| 80 |
|
|
title=dom-StorageEvent-oldValue><code>oldValue</code></dfn>
|
| 81 |
|
|
属性は、変化する鍵の古い値を表します。
|
| 82 |
apache |
1.9 |
|
| 83 |
|
|
|
| 84 |
|
|
#en |
| 85 |
|
|
The <dfn id=newvalue
|
| 86 |
|
|
title=dom-StorageEvent-vnewValue><code>newValue</code></dfn> attribute
|
| 87 |
|
|
represents the new value of the key being changed. |
| 88 |
|
|
#ja |
| 89 |
|
|
<dfn id=newvalue
|
| 90 |
|
|
title=dom-StorageEvent-vnewValue><code>newValue</code></dfn>
|
| 91 |
|
|
属性は、変化する鍵の新しい値を表します。
|
| 92 |
apache |
1.10 |
|
| 93 |
|
|
|
| 94 |
|
|
#en |
| 95 |
|
|
The <dfn id=url1 title=dom-StorageEvent-url><code>url</code></dfn>
|
| 96 |
|
|
attribute represents the address of the document that changed the key. |
| 97 |
|
|
#ja |
| 98 |
|
|
<dfn id=url1 title=dom-StorageEvent-url><code>url</code></dfn>
|
| 99 |
|
|
属性は、鍵を変更した文書の番地を表します。
|
| 100 |
apache |
1.11 |
|
| 101 |
|
|
|
| 102 |
|
|
#en |
| 103 |
|
|
The <dfn id=source1
|
| 104 |
|
|
title=dom-StorageEvent-source><code>source</code></dfn> attribute
|
| 105 |
|
|
represents the <code><a href="#window">Window</a></code> that changed the
|
| 106 |
|
|
key. |
| 107 |
|
|
#ja |
| 108 |
|
|
<dfn id=source1
|
| 109 |
|
|
title=dom-StorageEvent-source><code>source</code></dfn> 属性は、k
|
| 110 |
|
|
鍵を変更した <code><a href="#window">Window</a></code>
|
| 111 |
apache |
1.12 |
を表します。 |
| 112 |
|
|
|
| 113 |
|
|
#en |
| 114 |
|
|
Multiple browsing contexts must be able to access the local storage
|
| 115 |
|
|
areas simultaneously in a predictable manner. Scripts must not be able to
|
| 116 |
|
|
detect any concurrent script execution. |
| 117 |
|
|
#ja |
| 118 |
|
|
複数の閲覧文脈は、局所ストレージ領域に同時に予測可能な方法でアクセスできなければ[[MUST:なりません]]。
|
| 119 |
|
|
スクリプトが並行スクリプト実行を検知可能であっては[[MUST:なりません]]。
|
| 120 |
apache |
1.13 |
|
| 121 |
|
|
|
| 122 |
|
|
#en |
| 123 |
|
|
This is required to guarantee that the <code title=dom-Storage-length><a
|
| 124 |
|
|
href="#length10">length</a></code> attribute of a <code><a
|
| 125 |
|
|
href="#storage0">Storage</a></code> object never changes while a script is
|
| 126 |
|
|
executing, other than in a way that is predictable by the script itself. |
| 127 |
|
|
#ja |
| 128 |
|
|
これは <code><a
|
| 129 |
|
|
href="#storage0">Storage</a></code>
|
| 130 |
|
|
オブジェクトの <code title=dom-Storage-length><a
|
| 131 |
|
|
href="#length10">length</a></code>
|
| 132 |
|
|
属性があるスクリプトの実行中にスクリプト自体が予期可能な形以外で決して代わらないことを保証するために[[REQUIRED:要求]]されます。 |
| 133 |
apache |
1.14 |
|
| 134 |
|
|
|
| 135 |
|
|
#en |
| 136 |
|
|
There are various ways of implementing this requirement. One is that if
|
| 137 |
|
|
a script running in one browsing context accesses a local storage area,
|
| 138 |
|
|
the UA blocks scripts in other browsing contexts when they try to access
|
| 139 |
|
|
the local storage area for the <a href="#same-origin">same origin</a>
|
| 140 |
|
|
until the first script has executed to completion. (Similarly, when a
|
| 141 |
|
|
script in one browsing context accesses its session storage area, any
|
| 142 |
|
|
scripts that have the same top level browsing context and the <a
|
| 143 |
|
|
href="#same-origin">same origin</a> would block when accessing their
|
| 144 |
|
|
session storage area until the first script has executed to completion.)
|
| 145 |
|
|
Another (potentially more efficient but probably more complex)
|
| 146 |
|
|
implementation strategy is to use optimistic transactional script
|
| 147 |
|
|
execution. This specification does not require any particular
|
| 148 |
|
|
implementation strategy, so long as the requirement above is met. |
| 149 |
|
|
#ja |
| 150 |
|
|
この要件を実装する方法は色々あります。
|
| 151 |
|
|
1つは、ある閲覧文脈で走っているスクリプトが局所ストレージ領域にアクセスする場合、
|
| 152 |
|
|
そのスクリプトが実行完了するまでの間、
|
| 153 |
|
|
他の閲覧文脈中のスクリプトが<a href="#same-origin">同一起源</a>の局所ストレージ領域にアクセスしようとしたら利用者エージェントがブロックする、
|
| 154 |
|
|
というものです。
|
| 155 |
|
|
(同様に、ある閲覧文脈中のスクリプトがセッション・ストレージ領域にアクセスする時に、
|
| 156 |
|
|
そのスクリプトが実行完了するまでの間、
|
| 157 |
|
|
同じ最上位閲覧文脈と<a
|
| 158 |
|
|
href="#same-origin">同一起源</a>を持つスクリプトがセッション・ストレージ領域にアクセスする時にはブロックされることとなります。)
|
| 159 |
|
|
他の (より効率がよいかもしれないがより複雑であろう) 実装戦略は、
|
| 160 |
|
|
楽観的取引的スクリプト実行を使うというものです。
|
| 161 |
|
|
この仕様書は、前記の要件が満たされる限りにおいて、
|
| 162 |
|
|
いかなる実装戦略をも要求しません。 |
| 163 |
apache |
1.15 |
|
| 164 |
|
|
|
| 165 |
|
|
#pattern |
| 166 |
|
|
<span class=secno>* </span>Database storage |
| 167 |
|
|
#ja |
| 168 |
apache |
1.16 |
<span class=secno>$1 </span>データベース・ストレージ |
| 169 |
|
|
|
| 170 |
|
|
#pattern |
| 171 |
|
|
<span class=secno>* </span>Databases |
| 172 |
|
|
#ja |
| 173 |
apache |
1.17 |
<span class=secno>$1 </span>データベース |
| 174 |
|
|
|
| 175 |
|
|
#en |
| 176 |
|
|
Each <i><a href="#origin0">origin</a></i> has an associated set of
|
| 177 |
|
|
databases. Each database has a name and a current version. There is no way
|
| 178 |
|
|
to enumerate or delete the databases available for a domain from this API. |
| 179 |
|
|
#ja |
| 180 |
|
|
各<i><a href="#origin0">起源</a></i>は、それに関連付けられたデータベースの集合を持ちます。
|
| 181 |
|
|
各データベースは、名前と現在の版を持ちます。
|
| 182 |
|
|
この API を使ってあるドメインに利用可能なデータベースを列挙したり、
|
| 183 |
|
|
削除したりする方法はありません。
|
| 184 |
apache |
1.18 |
|
| 185 |
|
|
|
| 186 |
|
|
#en |
| 187 |
|
|
Each database has one version at a time, a database can't
|
| 188 |
|
|
exist in multiple versions at once. Versions are intended to allow authors
|
| 189 |
|
|
to manage schema changes incrementally and non-destructively, and without
|
| 190 |
|
|
running the risk of old code (e.g. in another browser window) trying to
|
| 191 |
|
|
write to a database with incorrect assumptions. |
| 192 |
|
|
#ja |
| 193 |
|
|
各データベースはある時点で1つの版を持ち、
|
| 194 |
|
|
1つのデータベースの複数の版が同時に存在することはできません。
|
| 195 |
|
|
版は著者がスキーマの変更を随時、非破壊的に、
|
| 196 |
|
|
かつ古い符号 (例えば他のブラウザ窓中のもの)
|
| 197 |
|
|
が誤った仮定の下でデータベースに書き込もうとする危険なしで行えるようにすることを意図したものです。 |
| 198 |
apache |
1.19 |
|
| 199 |
|
|
|
| 200 |
|
|
#en |
| 201 |
|
|
The <dfn id=opendatabase
|
| 202 |
|
|
title=dom-opendatabase><code>openDatabase()</code></dfn> method returns a
|
| 203 |
|
|
<code><a href="#database0">Database</a></code> object. The method takes
|
| 204 |
|
|
four arguments: a database name, a database version, a display name, and
|
| 205 |
|
|
an estimated size, in bytes, of the data that will be stored in the
|
| 206 |
|
|
database. |
| 207 |
|
|
#ja |
| 208 |
|
|
<dfn id=opendatabase
|
| 209 |
|
|
title=dom-opendatabase><code>openDatabase()</code></dfn>
|
| 210 |
|
|
メソッドは
|
| 211 |
|
|
<code><a href="#database0">Database</a></code>
|
| 212 |
|
|
オブジェクトを返します。
|
| 213 |
|
|
このメソッドは、データベース名、データベース版、
|
| 214 |
|
|
表示名、データベース中に蓄積されるデータの大きさの見積もり (バイト単位)
|
| 215 |
apache |
1.20 |
の4つの引数を取ります。 |
| 216 |
|
|
|
| 217 |
|
|
#en |
| 218 |
|
|
The <code title=dom-opendatabase><a
|
| 219 |
|
|
href="#opendatabase">openDatabase()</a></code> method must use and create
|
| 220 |
|
|
databases from the <a href="#origin0">origin</a> of the <a
|
| 221 |
|
|
href="#active">active document</a> of the <a href="#browsing1">browsing
|
| 222 |
|
|
context</a> of the <code><a href="#window">Window</a></code> object on
|
| 223 |
|
|
which the method was invoked. |
| 224 |
|
|
#ja |
| 225 |
|
|
<code title=dom-opendatabase><a
|
| 226 |
|
|
href="#opendatabase">openDatabase()</a></code>
|
| 227 |
|
|
メソッドは、それが呼び出された <code><a href="#window">Window</a></code>
|
| 228 |
|
|
オブジェクトの<a href="#browsing1">閲覧文脈</a>の<a
|
| 229 |
|
|
href="#active">活性文書</a>の<a href="#origin0">起源</a>からのデータベースを使用・作成しなければ[[MUST:なりません]]。
|
| 230 |
apache |
1.21 |
|
| 231 |
|
|
|
| 232 |
|
|
#en |
| 233 |
|
|
If the database version provided is not the empty string, and the
|
| 234 |
|
|
database already exists but has a different version, then the method must
|
| 235 |
|
|
raise an <code>INVALID_STATE_ERR</code> exception. |
| 236 |
|
|
#ja |
| 237 |
|
|
指定されたデータベースの版が空文字列でない場合で、
|
| 238 |
|
|
データベースが既に存在し、
|
| 239 |
|
|
異なる版を持つ場合、
|
| 240 |
|
|
メソッドは
|
| 241 |
|
|
<code>INVALID_STATE_ERR</code>
|
| 242 |
apache |
1.22 |
例外を発生させなければ[[MUST:なりません]]。 |
| 243 |
|
|
|
| 244 |
|
|
#en |
| 245 |
|
|
The user agent may also raise a <a href="#security10">security
|
| 246 |
|
|
exception</a> in case the request violates a policy decision (e.g. if the
|
| 247 |
|
|
user agent is configured to not allow the page to open databases). |
| 248 |
|
|
#ja |
| 249 |
|
|
利用者エージェントは、要求が方針決定に反する場合
|
| 250 |
|
|
(例えば、頁がデータベースを開くことを認めないように利用者エージェントが設定されている場合)
|
| 251 |
|
|
、
|
| 252 |
|
|
<a href="#security10">保安性例外</a>を発生させても[[MAY:構いません]]。 |