| 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 |
|
|
<span class=secno>$1 </span>データベース・ストレージ |