1 | using System;
|
---|
2 |
|
---|
3 | namespace SharpVectors.Dom.Events
|
---|
4 | {
|
---|
5 | /// <summary>
|
---|
6 | /// The <see cref="EventListener">EventListener</see> delegate is the
|
---|
7 | /// primary way for handling events.
|
---|
8 | /// </summary>
|
---|
9 | /// <remarks>
|
---|
10 | /// <para>
|
---|
11 | /// Users register their event listener on an
|
---|
12 | /// <see cref="IEventTarget">IEventTarget</see>. The users should also
|
---|
13 | /// remove their <see cref="EventListener">EventListener</see> from its
|
---|
14 | /// <see cref="IEventTarget">IEventTarget</see> after they have completed
|
---|
15 | /// using the listener.
|
---|
16 | /// </para>
|
---|
17 | /// <para>
|
---|
18 | /// Copying a <see cref="INode">INode</see> does not copy the event
|
---|
19 | /// listeners attached to it. Event listeners must be attached to the
|
---|
20 | /// newly created <see cref="INode">INode</see> afterwards if so desired.
|
---|
21 | /// Therefore, <see cref="INode">INode</see>s are copied using
|
---|
22 | /// <see cref="INode.CloneNode">INode.CloneNode</see> or
|
---|
23 | /// <see cref="IRange.CloneContents">IRange.CloneContents</see>, the
|
---|
24 | /// <see cref="EventListener">EventListener</see>s attached to the
|
---|
25 | /// source <see cref="INode">INode</see>s are not attached to their copies.
|
---|
26 | /// </para>
|
---|
27 | /// <para>
|
---|
28 | /// Moving a <see cref="INode">INode</see> does not affect the event
|
---|
29 | /// listeners attached to it. Therefore, when
|
---|
30 | /// <see cref="INode">INode</see>s are moved using
|
---|
31 | /// <see cref="IDocument.AdoptNode">IDocument.AdoptNode</see>,
|
---|
32 | /// <see cref="INode.AppendChild">INode.AppendChild</see>, or
|
---|
33 | /// <see cref="IRange.ExtractContents">IRange.ExtractContents</see>, the
|
---|
34 | /// <see cref="EventListener">EventListener</see>s attached to the
|
---|
35 | /// moved <see cref="INode">INode</see>s stay attached to them.
|
---|
36 | /// </para>
|
---|
37 | /// </remarks>
|
---|
38 | /// <paramref name="e">
|
---|
39 | /// The <see cref="IEvent">IEvent</see> contains contextual information
|
---|
40 | /// about the
|
---|
41 | /// <see href="http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/glossary.html#dt-event">event</see>.
|
---|
42 | /// </paramref>
|
---|
43 | public delegate void EventListener(
|
---|
44 | IEvent e);
|
---|
45 | }
|
---|