Javascript [Electronic resources] : The Definitive Guide (4th Edition) نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Javascript [Electronic resources] : The Definitive Guide (4th Edition) - نسخه متنی

David Flanagan

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید




Availability


DOM Level 2 Events


Synopsis



void addEventListener(String type,
EventListener listener,
boolean useCapture);

Arguments


type

The type of event for which the event listener is to be invoked. For
example, "load", "click", or
"mousedown".

listener

The event listener function that will be invoked when an event of the
specified type is dispatched to this Document node.

useCapture

If true, the specified
listener is to be invoked only during the
capturing phase of event propagation. The more common value of
false means that the
listener will not be invoked during the
capturing phase but instead will be invoked when this node is the
actual event target or when the event bubbles up to this node from
its original target.


Description


This method adds the specified event listener function to the set of
listeners registered on this node to handle events of the specified
type. If
useCapture is true, the
listener is registered as a capturing event listener. If
useCapture is false, it
is registered as a normal event listener.

addEventListener( ) may be called multiple times
to register multiple event handlers for the same type of event on the
same node. Note, however, that the DOM makes no guarantees about the
order in which multiple event handlers will be invoked.

If the same event listener function is registered twice on the same
node with the same type and
useCapture arguments, the second
registration is simply ignored. If a new event listener is registered
on this node while an event is being handled at this node, the new
event listener is not invoked for that event.

When a Document node is duplicated with Node.cloneNode(
) or Document.importNode( ), the event
listeners registered for the original node are not copied.


See Also


Event, EventListener; Chapter 19


/ 844