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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (hide annotations) (download)
Thu Oct 23 04:18:26 2008 UTC (17 years, 5 months ago) by wakaba
Branch: MAIN
CVS Tags: after-new-ids, HEAD
Changes since 1.8: +34 -34 lines
reflect id changes

1 apache 1.1 #pattern
2     <span class=secno>* </span>Event
3     handler attributes
4     #ja
5     <span class=secno>$1 </span>事象取扱器属性
6    
7     #en
8 wakaba 1.9 <a href=#html-elements>HTML elements</a> can have <dfn id=event-definition>event
9 apache 1.1 handler attributes</dfn> specified. These act as bubbling event listeners
10     for the element on which they are specified.
11     #ja
12 wakaba 1.9 <a href=#html-elements>HTML 要素</a>には<dfn id=event-definition>事象取扱器属性</dfn>を指定することができます。
13 apache 1.1 これは指定された属性に対する泡立ち事象聴取器として機能します。
14    
15     #en
16 wakaba 1.9 Each event handler attribute has two parts, an <a href=#event-definitions
17 apache 1.1 title="event handler content attributes">event handler content
18 wakaba 1.9 attribute</a> and an <a href=#event-loop title="event handler DOM
19 apache 1.1 attributes">event handler DOM attribute</a>. Event handler attributes must
20     initially be set to null. When their value changes (through the changing
21     of their event handler content attribute or their event handler DOM
22     attribute), they will either be null, or have an
23     <code>EventListener</code> object assigned to them.
24     #ja
25 wakaba 1.9 各事象取扱器属性は、<a href=#event-definitions
26     title="event handler content attributes">事象取扱器内容属性</a>と<a href=#event-loop title="event handler DOM
27 apache 1.1 attributes">事象取扱器 DOM 属性</a>の2つの部分を持ちます。
28     事象取扱器属性は、はじめ、 null に設定されなければ[[MUST:なりません]]。
29     (事象取扱器内容属性または事象取扱器 DOM 属性の変更により) 値が変化した時は、
30     null となるか、または <code>EventListener</code>
31     オブジェクトが割り当てられるかのいずれかとなります。
32    
33     #en
34     Objects other than <code>Element</code> objects, in particular <code><a
35 wakaba 1.9 href=#window>Window</a></code>, only have <a href=#event-loop title="event
36 apache 1.1 handler DOM attributes">event handler DOM attribute</a> (since they have
37     no content attributes).
38     #ja
39     <code>Element</code> オブジェクト以外のオブジェクト、特に <code><a
40 wakaba 1.9 href=#window>Window</a></code> は、<a href=#event-loop title="event
41 apache 1.1 handler DOM attributes">事象取扱器 DOM 属性</a>だけを持ちます (内容属性を持ちませんから)。
42    
43     #en
44 wakaba 1.9 <dfn id=event-definitions>Event handler content attributes</dfn>, when specified,
45 apache 1.1 must contain valid ECMAScript code matching the ECMAScript <code
46     title="">FunctionBody</code> production. <a
47 wakaba 1.9 href=#refsECMA262>[ECMA262]</a>
48 apache 1.1 #ja
49 wakaba 1.9 <dfn id=event-definitions>事象取扱器内容属性</dfn>は、指定された場合、
50 apache 1.1 ECMAScript <code
51     title="">FunctionBody</code> 生成規則に一致する妥当な ECMAScript 符号を含まなければなりません。<a
52 wakaba 1.9 href=#refsECMA262>[ECMA262]</a>
53 apache 1.1
54     #en
55     When an event handler content attribute is set, its new value must be
56     interpreted as the body of an anonymous function with a single argument
57     called <code>event</code>, with the new function's scope chain being
58     linked from the activation object of the handler, to the element, to the
59     element's <code>form</code> element if it is a form control, to the
60     <code>Document</code> object, to the <code><a
61 wakaba 1.9 href=#window>Window</a></code> object of the <a
62     href=#browsing-context>browsing context</a> of that <code>Document</code>. The
63 apache 1.1 function's <code>this</code> parameter must be the <code>Element</code>
64     object representing the element. The resulting function must then be set
65     as the value of the corresponding event handler attribute, and the new
66     value must be set as the value of the content attribute. If the given
67     function body fails to compile, then the corresponding event handler
68     attribute must be set to null instead (the content attribute must still be
69     updated to the new value, though).
70     #ja
71     事象取扱器内容属性が設定された時、新しい値を、
72     匿名関数であって <code>event</code> と呼ばれる引数を1つ持ち、
73     適用範囲鎖が取扱器の活性化オブジェクトから要素へ、
74     要素がフォーム制御子である場合フォームの <code>form</code>
75     要素へ、 <code>Document</code> オブジェクトへ、その <code>Document</code>
76     の<a
77 wakaba 1.9 href=#browsing-context>閲覧文脈</a>の <code><a
78     href=#window>Window</a></code> オブジェクトへと連結されているようなものの本体であるとして解釈しなければ[[MUST:なりません]]。
79 apache 1.1 この関数は、対応する事象取扱器属性の値として設定されなければ[[MUST:ならず]]、
80     新しい値は内容属性の値として設定されなければ[[MUST:なりません]]。
81     与えられた関数本体がコンパイルに失敗する場合は、対応する事象取扱器属性は代わりに null
82     に設定されなければ[[MUST:なりません]]
83     (ただし、内容属性はそれでも新しい値に更新されなければ[[MUST:なりません]])。
84    
85     #en
86     See ECMA262 Edition 3, sections 10.1.6 and 10.2.3, for more
87 wakaba 1.9 details on activation objects. <a href=#refsECMA262>[ECMA262]</a>
88 apache 1.1 #ja
89     活性化オブジェクトの詳細については、 ECMA 262 第3版の
90     10.1.6 節と 10.2.3 節を参照してください。
91 wakaba 1.9 <a href=#refsECMA262>[ECMA262]</a>
92 apache 1.1
93     #en
94 wakaba 1.9 The <a href=#script-execution-context>script execution context</a> of the event handler
95     must be the <code><a href=#window>Window</a></code> object at the end of
96     the scope chain. The <a href=#script-document-context>script document context</a> of the
97 apache 1.1 event handler must be the <code>Document</code> object that owns the event
98     handler content attribute that was set.
99     #ja
100 wakaba 1.9 事象取扱器の<a href=#script-execution-context>スクリプト実行文脈</a>は、
101     適用範囲鎖の最後の <code><a href=#window>Window</a></code>
102     オブジェクトでなければ[[MUST:なりません]]。事象取扱器の<a href=#script-document-context>スクリプト文書文脈</a>は、
103 apache 1.1 設定された事象取扱器内容属性を所有する <code>Document</code>
104     オブジェクトでなければ[[MUST:なりません]]。
105    
106     #en
107 wakaba 1.9 <dfn id=event-loop>Event handler DOM attributes</dfn>, on setting, must set
108 apache 1.1 the corresponding event handler attribute to their new value, and on
109     getting, must return whatever the current value of the corresponding event
110     handler attribute is (possibly null).
111     #ja
112 wakaba 1.9 <dfn id=event-loop>事象取扱器 DOM 属性</dfn>は、設定時、
113 apache 1.1 対応する事象取扱器属性を新しい値に設定しなければ[[MUST:ならず]]、
114     取得時、対応する事象取扱器属性の値を何であっても (null であっても)
115     返さなければ[[MUST:なりません]]。
116    
117     #en
118     The following are the event handler attributes that must be supported by
119 wakaba 1.9 all <a href=#html-elements>HTML elements</a>, as both content attributes
120     and DOM attributes, and on <code><a href=#window>Window</a></code>
121 apache 1.1
122     objects, as DOM attributes:
123     #ja
124 wakaba 1.9 次に示すのは、すべての <a href=#html-elements>HTML 要素</a>で内容属性としても DOM
125     属性としても対応しなければ[[MUST:ならず]]、 <code><a href=#window>Window</a></code>
126 apache 1.1 オブジェクトで DOM 属性として対応しなければ[[MUST:ならない]]事象取扱器属性です。
127    
128 apache 1.2 #pattern
129 apache 1.1 Must be invoked whenever an * event is targeted at or bubbles through
130     the element.
131     #ja
132 apache 1.8 $1 事象が当該要素を対象としているか、泡立って当該要素を通過する時には、
133     常に呼び出されなければ[[MUST:なりません]]。
134 apache 1.1
135 apache 1.3 #pattern
136     Must be invoked whenever a * event is targeted at or bubbles through
137     the element.
138     #ja
139 apache 1.8 $1 事象が当該要素を対象としているか、泡立って当該要素を通過する時には、
140     常に呼び出されなければ[[MUST:なりません]]。
141 apache 1.3
142 apache 1.4 #en
143     The <code title=handler-onerror><a
144 wakaba 1.9 href=#handler-onerror>onerror</a></code> handler is also used for <a
145     href=#runtime-script-errors>reporting script errors</a>.
146 apache 1.4 #ja
147     <code title=handler-onerror><a
148 wakaba 1.9 href=#handler-onerror>onerror</a></code> 取扱器は<a
149     href=#runtime-script-errors>スクリプト誤りの報告</a>にも使われます。
150 apache 1.5
151     #en
152     When an event handler attribute is invoked, its argument must be set to
153     the <code>Event</code> object of the event in question. If the function
154     returns the exact boolean value false, the event's
155     <code>preventDefault()</code> method must then invoked. Exception: for
156     historical reasons, for the HTML <code>mouseover</code> event, the
157     <code>preventDefault()</code> method must be called when the function
158     returns true instead.
159     #ja
160     事象取扱器属性が呼び出される時、その引数には当該事象の <code>Event</code>
161 apache 1.7 オブジェクトを設定しなければ[[MUST:なりません]]。関数がブール値の偽そのものを返した場合には、
162 apache 1.5 事象の <code>preventDefault()</code> メソッドを呼び出さなければ[[MUST:なりません]]。
163     例外: 歴史的理由により、 HTML <code>mouseover</code>
164     事象に関しては、 <code>preventDefault()</code> メソッドは、
165     代わりに関数が真を返した時に呼び出されなければ[[MUST:なりません]]。
166    
167     #en
168     All event handler attributes on an element, whether set to null or to a
169     function, must be registered as event listeners on the element, as if the
170     <code title=dom-EventTarget-addEventListenerNS>addEventListenerNS()</code>
171     method on the <code>Element</code> object's <code>EventTarget</code>
172     interface had been invoked when the element was created, with the event
173     type (<var title=dom-event-type>type</var> argument) equal to the type
174     described for the event handler attribute in the list above, the namespace
175     (<var title=dom-event-namespaceURI>namespaceURI</var> argument) set to
176     null, the listener set to be a target and bubbling phase listener (<var
177     title=dom-event-useCapture>useCapture</var> argument set to false), the
178     event group set to the default group (<var
179     title=dom-event-evtGroup>evtGroup</var> argument set to null), and the
180     event listener itself (<var title=dom-event-listener>listener</var>
181     argument) set to do nothing while the event handler attribute is null, and
182     set to invoke the function associated with the event handler attribute
183     otherwise. (The <var title=dom-event-listener>listener</var> argument is
184     emphatically <em>not</em> the event handler attribute itself.)
185     #ja
186     要素のすべての事象取扱器属性は、 null に設定されている場合も関数が設定されている場合も、
187     要素が作成された時に <code>Element</code> オブジェクトの <code>EventTarget</code>
188     界面の
189     <code title=dom-EventTarget-addEventListenerNS>addEventListenerNS()</code>
190     メソッドが事象型 (<var title=dom-event-type>type</var> 引数) は前述の並び中で当該事象取扱属性について示した型、
191 apache 1.6 名前空間 (<var title=dom-event-namespaceURI>namespaceURI</var> 引数) は
192 apache 1.5 null、聴取器は対象位相と泡立ち位相の聴取器として (<var
193     title=dom-event-useCapture>useCapture</var> 引数は偽)、
194     事象群は既定群として (<var
195     title=dom-event-evtGroup>evtGroup</var> 引数は null)、
196     事象聴取器自体 (<var title=dom-event-listener>listener</var> 引数) は事象取扱器属性が
197     null の場合はなにもしないとして、それ以外の場合は事象取扱器属性に関連付けられた関数を呼び出すとして
198     (<var title=dom-event-listener>listener</var> 引数は事象取扱器属性自体では<em>ない</em>と強調しておきます。)
199     呼び出した場合のように要素の事象取扱器として登録されなければ[[MUST:なりません]]。

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24