/[suikacvs]/markup/html/html5/spec-ja/data/storages.dat
Suika

Contents of /markup/html/html5/spec-ja/data/storages.dat

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.30 - (show annotations) (download)
Thu Oct 23 04:18:26 2008 UTC (17 years, 8 months ago) by wakaba
Branch: MAIN
CVS Tags: after-new-ids, HEAD
Changes since 1.29: +63 -63 lines
reflect id changes

1 #pattern
2 <span class=secno>* </span>The * event
3 #ja
4 <span class=secno>$1 </span>$2 事象
5
6 #en
7 The <dfn id=event-storage title=event-storage><code>storage</code></dfn>
8 event is fired in an <code><a href=#htmldocument>HTMLDocument</a></code>
9 when a storage area changes, as described in the previous two sections (<a
10 href=#sessionStorageEvent>for session storage</a>, <a
11 href=#localStorageEvent>for local storage</a>).
12 #ja
13 <dfn id=event-storage title=event-storage><code>storage</code></dfn>
14 事象は、 <code><a href=#htmldocument>HTMLDocument</a></code>
15 において、ストレージ領域が変化した時に。前の2つの節
16 (<a
17 href=#sessionStorageEvent>セッション・ストレージ対象</a>、<a
18 href=#localStorageEvent>局所ストレージ対象</a>)
19 で説明したように発火されます。
20
21
22 #en
23 When this happens, the user agent must dispatch an event with the name
24 <code><a href=#storage-0>storage</a></code>, with no namespace, which
25 does not bubble but is cancelable, and which uses the <code><a
26 href=#storageevent>StorageEvent</a></code>, at <a href=#the-body-element-1>the
27 body element</a> of each <a href=#active-document title="active
28 document">active</a> <code><a href=#htmldocument>HTMLDocument</a></code>
29 object affected.
30 #ja
31 利用者エージェントは、これが起こる時、名前
32 <code><a href=#storage-0>storage</a></code>、
33 名前空間なし、
34 泡立たず取消し可能で <code><a
35 href=#storageevent>StorageEvent</a></code>
36 を使った事象を、関係する<a href=#active-document title="active
37 document">活性</a> <code><a href=#htmldocument>HTMLDocument</a></code>
38 オブジェクトそれぞれの<a href=#the-body-element-1>文書
39 body 要素</a>に対して発送しなければ[[MUST:なりません]]。
40
41
42 #pattern
43 <span class=secno>* </span>Event definition
44 #ja
45 <span class=secno>$1 </span>事象定義
46
47 #en
48 The <dfn id=dom-storageevent-key title=dom-StorageEvent-key><code>key</code></dfn>
49 attribute represents the key being changed.
50 #ja
51 <dfn id=dom-storageevent-key title=dom-StorageEvent-key><code>key</code></dfn>
52 属性は、変化する鍵を表します。
53
54
55 #en
56 The <dfn id=dom-storageevent-oldvalue
57 title=dom-StorageEvent-oldValue><code>oldValue</code></dfn> attribute
58 represents the old value of the key being changed.
59 #ja
60 <dfn id=dom-storageevent-oldvalue
61 title=dom-StorageEvent-oldValue><code>oldValue</code></dfn>
62 属性は、変化する鍵の古い値を表します。
63
64
65 #en
66 The <dfn id=dom-storageevent-vnewvalue
67 title=dom-StorageEvent-vnewValue><code>newValue</code></dfn> attribute
68 represents the new value of the key being changed.
69 #ja
70 <dfn id=dom-storageevent-vnewvalue
71 title=dom-StorageEvent-vnewValue><code>newValue</code></dfn>
72 属性は、変化する鍵の新しい値を表します。
73
74
75 #en
76 The <dfn id=attr-input-type-url-keyword title=dom-StorageEvent-url><code>url</code></dfn>
77 attribute represents the address of the document that changed the key.
78 #ja
79 <dfn id=attr-input-type-url-keyword title=dom-StorageEvent-url><code>url</code></dfn>
80 属性は、鍵を変更した文書の番地を表します。
81
82
83 #en
84 The <dfn id=dom-storageevent-source
85 title=dom-StorageEvent-source><code>source</code></dfn> attribute
86 represents the <code><a href=#window>Window</a></code> that changed the
87 key.
88 #ja
89 <dfn id=dom-storageevent-source
90 title=dom-StorageEvent-source><code>source</code></dfn> 属性は、
91 鍵を変更した <code><a href=#window>Window</a></code>
92 を表します。
93
94 #en
95 Multiple browsing contexts must be able to access the local storage
96 areas simultaneously in a predictable manner. Scripts must not be able to
97 detect any concurrent script execution.
98 #ja
99 複数の閲覧文脈は、局所ストレージ領域に同時に予測可能な方法でアクセスできなければ[[MUST:なりません]]。
100 スクリプトが並行スクリプト実行を検知可能であっては[[MUST:なりません]]。
101
102
103 #en
104 This is required to guarantee that the <code title=dom-Storage-length><a
105 href=#dom-history-length>length</a></code> attribute of a <code><a
106 href=#storage-0>Storage</a></code> object never changes while a script is
107 executing, other than in a way that is predictable by the script itself.
108 #ja
109 これは <code><a
110 href=#storage-0>Storage</a></code>
111 オブジェクトの <code title=dom-Storage-length><a
112 href=#dom-history-length>length</a></code>
113 属性があるスクリプトの実行中にスクリプト自体が予期可能な形以外で決して代わらないことを保証するために[[REQUIRED:要求]]されます。
114
115
116 #en
117 There are various ways of implementing this requirement. One is that if
118 a script running in one browsing context accesses a local storage area,
119 the UA blocks scripts in other browsing contexts when they try to access
120 the local storage area for the <a href=#same-origin>same origin</a>
121 until the first script has executed to completion. (Similarly, when a
122 script in one browsing context accesses its session storage area, any
123 scripts that have the same top level browsing context and the <a
124 href=#same-origin>same origin</a> would block when accessing their
125 session storage area until the first script has executed to completion.)
126 Another (potentially more efficient but probably more complex)
127 implementation strategy is to use optimistic transactional script
128 execution. This specification does not require any particular
129 implementation strategy, so long as the requirement above is met.
130 #ja
131 この要件を実装する方法は色々あります。
132 1つは、ある閲覧文脈で走っているスクリプトが局所ストレージ領域にアクセスする場合、
133 そのスクリプトが実行完了するまでの間、
134 他の閲覧文脈中のスクリプトが<a href=#same-origin>同一起源</a>の局所ストレージ領域にアクセスしようとしたら利用者エージェントがブロックする、
135 というものです。
136 (同様に、ある閲覧文脈中のスクリプトがセッション・ストレージ領域にアクセスする時に、
137 そのスクリプトが実行完了するまでの間、
138 同じ最上位閲覧文脈と<a
139 href=#same-origin>同一起源</a>を持つスクリプトがセッション・ストレージ領域にアクセスする時にはブロックされることとなります。)
140 他の (より効率がよいかもしれないがより複雑であろう) 実装戦略は、
141 楽観的取引的スクリプト実行を使うというものです。
142 この仕様書は、前記の要件が満たされる限りにおいて、
143 いかなる実装戦略をも要求しません。
144
145
146 #pattern
147 <span class=secno>* </span>Database storage
148 #ja
149 <span class=secno>$1 </span>データベース・ストレージ
150
151 #pattern
152 <span class=secno>* </span>Databases
153 #ja
154 <span class=secno>$1 </span>データベース
155
156 #en
157 Each <i><a href=#origin-0>origin</a></i> has an associated set of
158 databases. Each database has a name and a current version. There is no way
159 to enumerate or delete the databases available for a domain from this API.
160 #ja
161 各<i><a href=#origin-0>起源</a></i>は、それに関連付けられたデータベースの集合を持ちます。
162 各データベースは、名前と現在の版を持ちます。
163 この API を使ってあるドメインに利用可能なデータベースを列挙したり、
164 削除したりする方法はありません。
165
166
167 #en
168 Each database has one version at a time, a database can't
169 exist in multiple versions at once. Versions are intended to allow authors
170 to manage schema changes incrementally and non-destructively, and without
171 running the risk of old code (e.g. in another browser window) trying to
172 write to a database with incorrect assumptions.
173 #ja
174 各データベースはある時点で1つの版を持ち、
175 1つのデータベースの複数の版が同時に存在することはできません。
176 版は著者がスキーマの変更を随時、非破壊的に、
177 かつ古い符号 (例えば他のブラウザ窓中のもの)
178 が誤った仮定の下でデータベースに書き込もうとする危険なしで行えるようにすることを意図したものです。
179
180
181 #en
182 The <dfn id=dom-opendatabase
183 title=dom-opendatabase><code>openDatabase()</code></dfn> method returns a
184 <code><a href=#database>Database</a></code> object. The method takes
185 four arguments: a database name, a database version, a display name, and
186 an estimated size, in bytes, of the data that will be stored in the
187 database.
188 #ja
189 <dfn id=dom-opendatabase
190 title=dom-opendatabase><code>openDatabase()</code></dfn>
191 メソッドは
192 <code><a href=#database>Database</a></code>
193 オブジェクトを返します。
194 このメソッドは、データベース名、データベース版、
195 表示名、データベース中に蓄積されるデータの大きさの見積もり (バイト単位)
196 の4つの引数を取ります。
197
198 #en
199 The <code title=dom-opendatabase><a
200 href=#dom-opendatabase>openDatabase()</a></code> method must use and create
201 databases from the <a href=#origin-0>origin</a> of the <a
202 href=#active-document>active document</a> of the <a href=#browsing-context>browsing
203 context</a> of the <code><a href=#window>Window</a></code> object on
204 which the method was invoked.
205 #ja
206 <code title=dom-opendatabase><a
207 href=#dom-opendatabase>openDatabase()</a></code>
208 メソッドは、それが呼び出された <code><a href=#window>Window</a></code>
209 オブジェクトの<a href=#browsing-context>閲覧文脈</a>の<a
210 href=#active-document>活性文書</a>の<a href=#origin-0>起源</a>からのデータベースを使用・作成しなければ[[MUST:なりません]]。
211
212
213 #en
214 If the database version provided is not the empty string, and the
215 database already exists but has a different version, then the method must
216 raise an <code>INVALID_STATE_ERR</code> exception.
217 #ja
218 指定されたデータベースの版が空文字列でない場合で、
219 データベースが既に存在し、
220 異なる版を持つ場合、
221 メソッドは
222 <code>INVALID_STATE_ERR</code>
223 例外を発生させなければ[[MUST:なりません]]。
224
225 #en
226 The user agent may also raise a <a href=#security-exception>security
227 exception</a> in case the request violates a policy decision (e.g. if the
228 user agent is configured to not allow the page to open databases).
229 #ja
230 利用者エージェントは、要求が方針決定に反する場合
231 (例えば、頁がデータベースを開くことを認めないように利用者エージェントが設定されている場合)
232
233 <a href=#security-exception>保安性例外</a>を発生させても[[MAY:構いません]]。
234
235 #en
236 Otherwise, if the database version provided is the empty string, or if
237 the database doesn't yet exist, or if the database exists and the version
238 provided to the <code title=dom-opendatabase><a
239 href=#dom-opendatabase>openDatabase()</a></code> method is the same as the
240 current version associated with the database, then the method must return
241 a <code><a href=#database>Database</a></code> object representing the
242 database that has the name that was given. If no such database exists, it
243 must be created first.
244 #ja
245 そうでない場合、指定されたデータベースの版が空文字列の場合、
246 またはデータベースがまだ存在しない場合、
247 またはデータベースが存在し、 <code title=dom-opendatabase><a
248 href=#dom-opendatabase>openDatabase()</a></code>
249 メソッドに指定されて版がデータベースに関連付けられている現在の版と同じである場合には、
250 メソッドは、指定された名前を持つデータベースを表す
251 <code><a href=#database>Database</a></code>
252 オブジェクトを返さなければ[[MUST:なりません]]。
253 そのようなデータベースが存在しない場合、
254 まずそれを作らなければ[[MUST:なりません]]。
255
256 #en
257 All strings including the empty string are valid database names.
258 Database names must be compared in a <a
259 href=#case-sensitive>case-sensitive</a> manner.
260 #ja
261 空文字列を含むすべての文字列は妥当なデータベース名です。
262 データベース名は<a
263 href=#case-sensitive>大文字・小文字を区別</a>した形で比較しなければ[[MUST:なりません]]。
264
265 #en
266 Implementations can support this even in environments that
267 only support a subset of all strings as database names by mapping database
268 names (e.g. using a hashing algorithm) to the supported set of names.
269 #ja
270 実装は、すべての文字列の部分集合をデータベース名として扱う環境であっても、
271 データベース名を対応している名前の集合に写像する
272 (例えばハッシュ算法を使う) ことにより、これに対応することができます。
273
274 #en
275 User agents are expected to use the display name and the estimated
276 database size to optimize the user experience. For example, a user agent
277 could use the estimated size to suggest an initial quota to the user. This
278 allows a site that is aware that it will try to use hundreds of megabytes
279 to declare this upfront, instead of the user agent prompting the user for
280 permission to increase the quota every five megabytes.
281 #ja
282 利用者エージェントに対しては、表示名とデータベースの大きさの見積もりを、
283 利用者の体験の最適化のために使うことを期待しています。
284 例えば、利用者エージェントは、利用者に対して最初の割当量を提示するために大きさの見積もりを使うことができます。
285 それによって、はじめから数百メガバイトを使うであろうことがわかっているサイトがそれを予め宣言しておけば、
286 利用者エージェントは5メガバイト毎に割当量を増やすかどうかを利用者に問わなくてもよくなります。
287
288 #en
289 The <dfn id=dom-database-transaction
290 title=dom-database-transaction><code>transaction()</code></dfn> method
291 takes one or two arguments. When called, the method must immediately
292 return and then asynchronously run the <a href=#transaction-steps>transaction
293 steps</a> with the <i>transaction callback</i> being the first argument,
294 the <i>error callback</i> being the second argument, if any, the
295 <i>success callback</i> being the third argument, if any, and with no
296 <i>preflight operation</i> or <i>postflight operation</i>.
297 #ja
298 <dfn id=dom-database-transaction
299 title=dom-database-transaction><code>transaction()</code></dfn>
300 メソッドは1つか2つの引数を取ります。
301 このメソッドは、呼び出された時、
302 すぐに返り、それから非同期に、
303 <i>取引呼び戻し</i>を最初の引数とし、
304 <i>誤り呼び戻し</i>を2つ目の引数があればそれとし、
305 <i>成功呼び戻し</i>を3つ目の引数があればそれとし、
306 <i>飛行前操作</i>と<i>飛行後操作</i>はなしとして、
307 <a href=#transaction-steps>取引段階</a>を走らせなければ[[MUST:なりません]]。

[email protected]
ViewVC Help
Powered by ViewVC 1.1.24