#pattern
* Event
handler attributes
#ja
$1 事象取扱器属性
#en
HTML elements can have event
handler attributes specified. These act as bubbling event listeners
for the element on which they are specified.
#ja
HTML 要素には事象取扱器属性を指定することができます。
これは指定された属性に対する泡立ち事象聴取器として機能します。
#en
Each event handler attribute has two parts, an event handler content
attribute and an event handler DOM attribute. Event handler attributes must
initially be set to null. When their value changes (through the changing
of their event handler content attribute or their event handler DOM
attribute), they will either be null, or have an
EventListener object assigned to them.
#ja
各事象取扱器属性は、事象取扱器内容属性と事象取扱器 DOM 属性の2つの部分を持ちます。
事象取扱器属性は、はじめ、 null に設定されなければ[[MUST:なりません]]。
(事象取扱器内容属性または事象取扱器 DOM 属性の変更により) 値が変化した時は、
null となるか、または EventListener
オブジェクトが割り当てられるかのいずれかとなります。
#en
Objects other than Element objects, in particular Window, only have event handler DOM attribute (since they have
no content attributes).
#ja
Element オブジェクト以外のオブジェクト、特に Window は、事象取扱器 DOM 属性だけを持ちます (内容属性を持ちませんから)。
#en
Event handler content attributes, when specified,
must contain valid ECMAScript code matching the ECMAScript FunctionBody production. [ECMA262]
#ja
事象取扱器内容属性は、指定された場合、
ECMAScript FunctionBody 生成規則に一致する妥当な ECMAScript 符号を含まなければなりません。[ECMA262]
#en
When an event handler content attribute is set, its new value must be
interpreted as the body of an anonymous function with a single argument
called event, with the new function's scope chain being
linked from the activation object of the handler, to the element, to the
element's form element if it is a form control, to the
Document object, to the Window object of the browsing context of that Document. The
function's this parameter must be the Element
object representing the element. The resulting function must then be set
as the value of the corresponding event handler attribute, and the new
value must be set as the value of the content attribute. If the given
function body fails to compile, then the corresponding event handler
attribute must be set to null instead (the content attribute must still be
updated to the new value, though).
#ja
事象取扱器内容属性が設定された時、新しい値を、
匿名関数であって event と呼ばれる引数を1つ持ち、
適用範囲鎖が取扱器の活性化オブジェクトから要素へ、
要素がフォーム制御子である場合フォームの form
要素へ、 Document オブジェクトへ、その Document
の閲覧文脈の Window オブジェクトへと連結されているようなものの本体であるとして解釈しなければ[[MUST:なりません]]。
この関数は、対応する事象取扱器属性の値として設定されなければ[[MUST:ならず]]、
新しい値は内容属性の値として設定されなければ[[MUST:なりません]]。
与えられた関数本体がコンパイルに失敗する場合は、対応する事象取扱器属性は代わりに null
に設定されなければ[[MUST:なりません]]
(ただし、内容属性はそれでも新しい値に更新されなければ[[MUST:なりません]])。
#en
See ECMA262 Edition 3, sections 10.1.6 and 10.2.3, for more
details on activation objects. [ECMA262]
#ja
活性化オブジェクトの詳細については、 ECMA 262 第3版の
10.1.6 節と 10.2.3 節を参照してください。
[ECMA262]
#en
The script execution context of the event handler
must be the Window object at the end of
the scope chain. The script document context of the
event handler must be the Document object that owns the event
handler content attribute that was set.
#ja
事象取扱器のスクリプト実行文脈は、
適用範囲鎖の最後の Window
オブジェクトでなければ[[MUST:なりません]]。事象取扱器のスクリプト文書文脈は、
設定された事象取扱器内容属性を所有する Document
オブジェクトでなければ[[MUST:なりません]]。
#en
Event handler DOM attributes, on setting, must set
the corresponding event handler attribute to their new value, and on
getting, must return whatever the current value of the corresponding event
handler attribute is (possibly null).
#ja
事象取扱器 DOM 属性は、設定時、
対応する事象取扱器属性を新しい値に設定しなければ[[MUST:ならず]]、
取得時、対応する事象取扱器属性の値を何であっても (null であっても)
返さなければ[[MUST:なりません]]。
#en
The following are the event handler attributes that must be supported by
all HTML elements, as both content attributes
and DOM attributes, and on Window
objects, as DOM attributes:
#ja
次に示すのは、すべての HTML 要素で内容属性としても DOM
属性としても対応しなければ[[MUST:ならず]]、 Window
オブジェクトで DOM 属性として対応しなければ[[MUST:ならない]]事象取扱器属性です。
#pattern
Must be invoked whenever an * event is targeted at or bubbles through
the element.
#ja
$1 事象が当該要素を対象とするか、泡立ち当該要素を通過する時には常に呼び出されなければ[[MUST:なりません]]。