|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
2 <html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#"> |
|
3 <head> |
|
4 <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
|
5 <title>API: event-custom EventTarget (YUI Library)</title> |
|
6 |
|
7 <link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" /> |
|
8 <link rel="stylesheet" type="text/css" href="assets/api.css" /> |
|
9 |
|
10 <script type="text/javascript" src="assets/api-js"></script> |
|
11 <script type="text/javascript" src="assets/ac-js"></script> |
|
12 </head> |
|
13 |
|
14 <body id="yahoo-com"> |
|
15 |
|
16 <div id="doc3" class="yui-t2"> |
|
17 <div id="hd"> |
|
18 <h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1> |
|
19 <h3>event-custom <span class="subtitle">3.0.0b1</span></h3> |
|
20 <a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a> |
|
21 > <a href="./module_event-custom.html" title="event-custom">event-custom</a> |
|
22 > EventTarget |
|
23 |
|
24 <form onsubmit="return false"> |
|
25 <div id="propertysearch"> |
|
26 Search: <input autocomplete="off" id="searchinput" /> |
|
27 <div id="searchresults"> |
|
28 |
|
29 </div> |
|
30 </div> |
|
31 </form> |
|
32 </div> |
|
33 |
|
34 <div id="bd"> |
|
35 <div id="yui-main"> |
|
36 <div class="yui-b"> |
|
37 <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form"> |
|
38 <fieldset> |
|
39 <legend>Filters</legend> |
|
40 <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span> |
|
41 <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span> |
|
42 <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span> |
|
43 </fieldset> |
|
44 </form> |
|
45 |
|
46 <h2> |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 Class <b property="yui:name">EventTarget</b> |
|
52 <span class="extends"> |
|
53 </span> |
|
54 |
|
55 </h2> |
|
56 <!-- class tree goes here --> |
|
57 |
|
58 <dl class="subclasses" rel="yui:subclasses"> |
|
59 <dt>Known Subclasses:</dt> |
|
60 <dd> |
|
61 <span rel="yui:subclass" resource="AsyncQueue.html"> |
|
62 <a href="AsyncQueue.html" property="yui:name" title="AsyncQueue">AsyncQueue</a> |
|
63 </span> |
|
64 </dd> |
|
65 </dl> |
|
66 |
|
67 |
|
68 |
|
69 <div class="summary description" property="yui:description"> |
|
70 EventTarget provides the implementation for any object to |
|
71 publish, subscribe and fire to custom events, and also |
|
72 alows other EventTargets to target the object with events |
|
73 sourced from the other object. |
|
74 EventTarget is designed to be used with Y.augment to wrap |
|
75 EventCustom in an interface that allows events to be listened to |
|
76 and fired by name. This makes it possible for implementing code to |
|
77 subscribe to an event that either has not been created yet, or will |
|
78 not be created at all. |
|
79 </div> |
|
80 |
|
81 |
|
82 <div rel="yui:properties" resource="#properties"> |
|
83 |
|
84 </div> |
|
85 |
|
86 <div rel="yui:methods" resource="#methods"> |
|
87 <div class="section method details"> |
|
88 <h3 id="methods">Methods</h3> |
|
89 <div class="content"> |
|
90 <div class="private" rel="yui:method" resource="#method__getType"> |
|
91 <h4> |
|
92 <a name="method__getType">_getType</a></h4> |
|
93 <div class="detail" > |
|
94 <code> |
|
95 private |
|
96 |
|
97 |
|
98 void |
|
99 <strong property="yui:name">_getType</strong> |
|
100 ( |
|
101 ) |
|
102 </code> |
|
103 |
|
104 <div class="description" property="yui:description"> |
|
105 If the instance has a prefix attribute and the |
|
106 event type is not prefixed, the instance prefix is |
|
107 applied to the supplied type. |
|
108 </div> |
|
109 |
|
110 <div class="description"> |
|
111 |
|
112 |
|
113 <dl> |
|
114 <dt>Returns: |
|
115 <code property="yui:return"> |
|
116 void |
|
117 </code></dt> |
|
118 <dd property="yui:returnInfo"></dd> |
|
119 </dl> |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 </div> |
|
125 |
|
126 </div> |
|
127 <hr /> |
|
128 </div> |
|
129 <div class="private" rel="yui:method" resource="#method__parseType"> |
|
130 <h4> |
|
131 <a name="method__parseType">_parseType</a></h4> |
|
132 <div class="detail" > |
|
133 <code> |
|
134 private |
|
135 |
|
136 |
|
137 void |
|
138 <strong property="yui:name">_parseType</strong> |
|
139 ( |
|
140 ) |
|
141 </code> |
|
142 |
|
143 <div class="description" property="yui:description"> |
|
144 Returns an array with the detach key (if provided), |
|
145 and the prefixed event name from _getType |
|
146 Y.on('detachcategory, menu:click', fn) |
|
147 </div> |
|
148 |
|
149 <div class="description"> |
|
150 |
|
151 |
|
152 <dl> |
|
153 <dt>Returns: |
|
154 <code property="yui:return"> |
|
155 void |
|
156 </code></dt> |
|
157 <dd property="yui:returnInfo"></dd> |
|
158 </dl> |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 </div> |
|
164 |
|
165 </div> |
|
166 <hr /> |
|
167 </div> |
|
168 <div class="" rel="yui:method" resource="#method_addTarget"> |
|
169 <h4> |
|
170 <a name="method_addTarget">addTarget</a></h4> |
|
171 <div class="detail" > |
|
172 <code> |
|
173 |
|
174 |
|
175 |
|
176 void |
|
177 <strong property="yui:name">addTarget</strong> |
|
178 ( |
|
179 |
|
180 |
|
181 o |
|
182 |
|
183 |
|
184 ) |
|
185 </code> |
|
186 |
|
187 <div class="description" property="yui:description"> |
|
188 Registers another EventTarget as a bubble target. Bubble order |
|
189 is determined by the order registered. Multiple targets can |
|
190 be specified. |
|
191 </div> |
|
192 |
|
193 <div class="description"> |
|
194 |
|
195 <dl rel="yui:parameters"> |
|
196 <dt>Parameters:</dt> |
|
197 <dd rel="yui:parameter"> |
|
198 <code><span property="yui:name">o</span> |
|
199 <<span property="yui:type">EventTarget</span>> |
|
200 </code> |
|
201 <span property="yui:description"> the target to add</span> |
|
202 </dd> |
|
203 </dl> |
|
204 |
|
205 <dl> |
|
206 <dt>Returns: |
|
207 <code property="yui:return"> |
|
208 void |
|
209 </code></dt> |
|
210 <dd property="yui:returnInfo"></dd> |
|
211 </dl> |
|
212 |
|
213 |
|
214 |
|
215 |
|
216 </div> |
|
217 |
|
218 </div> |
|
219 <hr /> |
|
220 </div> |
|
221 <div class="" rel="yui:method" resource="#method_after"> |
|
222 <h4> |
|
223 <a name="method_after">after</a></h4> |
|
224 <div class="detail" > |
|
225 <code> |
|
226 |
|
227 |
|
228 |
|
229 |
|
230 <strong property="yui:name">after</strong> |
|
231 ( |
|
232 |
|
233 |
|
234 type |
|
235 |
|
236 |
|
237 , |
|
238 fn |
|
239 |
|
240 |
|
241 ) |
|
242 </code> |
|
243 |
|
244 <div class="description" property="yui:description"> |
|
245 Subscribe to a custom event hosted by this object. The |
|
246 supplied callback will execute after any listeners add |
|
247 via the subscribe method, and after the default function, |
|
248 if configured for the event, has executed. |
|
249 </div> |
|
250 |
|
251 <div class="description"> |
|
252 |
|
253 <dl rel="yui:parameters"> |
|
254 <dt>Parameters:</dt> |
|
255 <dd rel="yui:parameter"> |
|
256 <code><span property="yui:name">type</span> |
|
257 <<span property="yui:type">string</span>> |
|
258 </code> |
|
259 <span property="yui:description"> The type of the event</span> |
|
260 </dd> |
|
261 <dd rel="yui:parameter"> |
|
262 <code><span property="yui:name">fn</span> |
|
263 <<span property="yui:type">Function</span>> |
|
264 </code> |
|
265 <span property="yui:description"> The callback</span> |
|
266 </dd> |
|
267 </dl> |
|
268 |
|
269 |
|
270 |
|
271 |
|
272 |
|
273 </div> |
|
274 |
|
275 </div> |
|
276 <hr /> |
|
277 </div> |
|
278 <div class=" deprecated" rel="yui:method" resource="#method_before"> |
|
279 <h4> |
|
280 <a name="method_before">before</a></h4> |
|
281 <div class="detail" > |
|
282 <code> |
|
283 |
|
284 |
|
285 |
|
286 |
|
287 <strong property="yui:name">before</strong> |
|
288 ( |
|
289 ) |
|
290 </code> |
|
291 |
|
292 <div class="description" property="yui:description"> |
|
293 Executes the callback before a DOM event, custom event |
|
294 or method. If the first argument is a function, it |
|
295 is assumed the target is a method. For DOM and custom |
|
296 events, this is an alias for Y.on. |
|
297 For DOM and custom events: |
|
298 type, callback, context, 1-n arguments |
|
299 For methods: |
|
300 callback, object (method host), methodName, context, 1-n arguments |
|
301 </div> |
|
302 |
|
303 <div class="description"> |
|
304 |
|
305 |
|
306 |
|
307 |
|
308 |
|
309 <div class="deprecated"> |
|
310 <strong>Deprecated</strong> use the on method |
|
311 </div> |
|
312 |
|
313 </div> |
|
314 |
|
315 </div> |
|
316 <hr /> |
|
317 </div> |
|
318 <div class="" rel="yui:method" resource="#method_bubble"> |
|
319 <h4> |
|
320 <a name="method_bubble">bubble</a></h4> |
|
321 <div class="detail" > |
|
322 <code> |
|
323 |
|
324 |
|
325 |
|
326 boolean |
|
327 <strong property="yui:name">bubble</strong> |
|
328 ( |
|
329 |
|
330 |
|
331 evt |
|
332 |
|
333 |
|
334 ) |
|
335 </code> |
|
336 |
|
337 <div class="description" property="yui:description"> |
|
338 Propagate an event |
|
339 </div> |
|
340 |
|
341 <div class="description"> |
|
342 |
|
343 <dl rel="yui:parameters"> |
|
344 <dt>Parameters:</dt> |
|
345 <dd rel="yui:parameter"> |
|
346 <code><span property="yui:name">evt</span> |
|
347 <<span property="yui:type">Event.Custom</span>> |
|
348 </code> |
|
349 <span property="yui:description"> the custom event to propagate</span> |
|
350 </dd> |
|
351 </dl> |
|
352 |
|
353 <dl> |
|
354 <dt>Returns: |
|
355 <code property="yui:return"> |
|
356 boolean |
|
357 </code></dt> |
|
358 <dd property="yui:returnInfo">the aggregated return value from Event.Custom.fire</dd> |
|
359 </dl> |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 </div> |
|
365 |
|
366 </div> |
|
367 <hr /> |
|
368 </div> |
|
369 <div class="" rel="yui:method" resource="#method_detach"> |
|
370 <h4> |
|
371 <a name="method_detach">detach</a></h4> |
|
372 <div class="detail" > |
|
373 <code> |
|
374 |
|
375 |
|
376 |
|
377 EventTarget |
|
378 <strong property="yui:name">detach</strong> |
|
379 ( |
|
380 |
|
381 |
|
382 type |
|
383 |
|
384 |
|
385 , |
|
386 fn |
|
387 |
|
388 |
|
389 , |
|
390 context |
|
391 |
|
392 |
|
393 ) |
|
394 </code> |
|
395 |
|
396 <div class="description" property="yui:description"> |
|
397 Detach one or more listeners the from the specified event |
|
398 </div> |
|
399 |
|
400 <div class="description"> |
|
401 |
|
402 <dl rel="yui:parameters"> |
|
403 <dt>Parameters:</dt> |
|
404 <dd rel="yui:parameter"> |
|
405 <code><span property="yui:name">type</span> |
|
406 <<span property="yui:type">string|Object</span>> |
|
407 </code> |
|
408 <span property="yui:description"> Either the handle to the subscriber or the |
|
409 type of event. If the type |
|
410 is not specified, it will attempt to remove |
|
411 the listener from all hosted events.</span> |
|
412 </dd> |
|
413 <dd rel="yui:parameter"> |
|
414 <code><span property="yui:name">fn</span> |
|
415 <<span property="yui:type">Function</span>> |
|
416 </code> |
|
417 <span property="yui:description"> The subscribed function to unsubscribe, if not |
|
418 supplied, all subscribers will be removed.</span> |
|
419 </dd> |
|
420 <dd rel="yui:parameter"> |
|
421 <code><span property="yui:name">context</span> |
|
422 <<span property="yui:type">Object</span>> |
|
423 </code> |
|
424 <span property="yui:description"> The custom object passed to subscribe. This is |
|
425 optional, but if supplied will be used to |
|
426 disambiguate multiple listeners that are the same |
|
427 (e.g., you subscribe many object using a function |
|
428 that lives on the prototype)</span> |
|
429 </dd> |
|
430 </dl> |
|
431 |
|
432 <dl> |
|
433 <dt>Returns: |
|
434 <code property="yui:return"> |
|
435 EventTarget |
|
436 </code></dt> |
|
437 <dd property="yui:returnInfo">the host</dd> |
|
438 </dl> |
|
439 |
|
440 |
|
441 |
|
442 |
|
443 </div> |
|
444 |
|
445 </div> |
|
446 <hr /> |
|
447 </div> |
|
448 <div class="" rel="yui:method" resource="#method_detachAll"> |
|
449 <h4> |
|
450 <a name="method_detachAll">detachAll</a></h4> |
|
451 <div class="detail" > |
|
452 <code> |
|
453 |
|
454 |
|
455 |
|
456 void |
|
457 <strong property="yui:name">detachAll</strong> |
|
458 ( |
|
459 |
|
460 |
|
461 type |
|
462 |
|
463 |
|
464 ) |
|
465 </code> |
|
466 |
|
467 <div class="description" property="yui:description"> |
|
468 Removes all listeners from the specified event. If the event type |
|
469 is not specified, all listeners from all hosted custom events will |
|
470 be removed. |
|
471 </div> |
|
472 |
|
473 <div class="description"> |
|
474 |
|
475 <dl rel="yui:parameters"> |
|
476 <dt>Parameters:</dt> |
|
477 <dd rel="yui:parameter"> |
|
478 <code><span property="yui:name">type</span> |
|
479 <<span property="yui:type">string</span>> |
|
480 </code> |
|
481 <span property="yui:description"> The type, or name of the event</span> |
|
482 </dd> |
|
483 </dl> |
|
484 |
|
485 <dl> |
|
486 <dt>Returns: |
|
487 <code property="yui:return"> |
|
488 void |
|
489 </code></dt> |
|
490 <dd property="yui:returnInfo"></dd> |
|
491 </dl> |
|
492 |
|
493 |
|
494 |
|
495 |
|
496 </div> |
|
497 |
|
498 </div> |
|
499 <hr /> |
|
500 </div> |
|
501 <div class="" rel="yui:method" resource="#method_fire"> |
|
502 <h4> |
|
503 <a name="method_fire">fire</a></h4> |
|
504 <div class="detail" > |
|
505 <code> |
|
506 |
|
507 |
|
508 |
|
509 boolean |
|
510 <strong property="yui:name">fire</strong> |
|
511 ( |
|
512 |
|
513 |
|
514 type |
|
515 |
|
516 |
|
517 , |
|
518 arguments |
|
519 |
|
520 |
|
521 ) |
|
522 </code> |
|
523 |
|
524 <div class="description" property="yui:description"> |
|
525 Fire a custom event by name. The callback functions will be executed |
|
526 from the context specified when the event was created, and with the |
|
527 following parameters. |
|
528 If the custom event object hasn't been created, then the event hasn't |
|
529 been published and it has no subscribers. For performance sake, we |
|
530 immediate exit in this case. This means the event won't bubble, so |
|
531 if the intention is that a bubble target be notified, the event must |
|
532 be published on this object first. |
|
533 </div> |
|
534 |
|
535 <div class="description"> |
|
536 |
|
537 <dl rel="yui:parameters"> |
|
538 <dt>Parameters:</dt> |
|
539 <dd rel="yui:parameter"> |
|
540 <code><span property="yui:name">type</span> |
|
541 <<span property="yui:type">String|Object</span>> |
|
542 </code> |
|
543 <span property="yui:description"> The type of the event, or an object that contains |
|
544 a 'type' property.</span> |
|
545 </dd> |
|
546 <dd rel="yui:parameter"> |
|
547 <code><span property="yui:name">arguments</span> |
|
548 <<span property="yui:type">Object*</span>> |
|
549 </code> |
|
550 <span property="yui:description"> an arbitrary set of parameters to pass to |
|
551 the handler.</span> |
|
552 </dd> |
|
553 </dl> |
|
554 |
|
555 <dl> |
|
556 <dt>Returns: |
|
557 <code property="yui:return"> |
|
558 boolean |
|
559 </code></dt> |
|
560 <dd property="yui:returnInfo">the return value from Event.Custom.fire</dd> |
|
561 </dl> |
|
562 |
|
563 |
|
564 |
|
565 |
|
566 </div> |
|
567 |
|
568 </div> |
|
569 <hr /> |
|
570 </div> |
|
571 <div class="" rel="yui:method" resource="#method_getEvent"> |
|
572 <h4> |
|
573 <a name="method_getEvent">getEvent</a></h4> |
|
574 <div class="detail" > |
|
575 <code> |
|
576 |
|
577 |
|
578 |
|
579 Event.Custom |
|
580 <strong property="yui:name">getEvent</strong> |
|
581 ( |
|
582 |
|
583 |
|
584 type |
|
585 |
|
586 |
|
587 ) |
|
588 </code> |
|
589 |
|
590 <div class="description" property="yui:description"> |
|
591 Returns the custom event of the provided type has been created, a |
|
592 falsy value otherwise |
|
593 </div> |
|
594 |
|
595 <div class="description"> |
|
596 |
|
597 <dl rel="yui:parameters"> |
|
598 <dt>Parameters:</dt> |
|
599 <dd rel="yui:parameter"> |
|
600 <code><span property="yui:name">type</span> |
|
601 <<span property="yui:type">string</span>> |
|
602 </code> |
|
603 <span property="yui:description"> the type, or name of the event</span> |
|
604 </dd> |
|
605 </dl> |
|
606 |
|
607 <dl> |
|
608 <dt>Returns: |
|
609 <code property="yui:return"> |
|
610 Event.Custom |
|
611 </code></dt> |
|
612 <dd property="yui:returnInfo">the custom event or null</dd> |
|
613 </dl> |
|
614 |
|
615 |
|
616 |
|
617 |
|
618 </div> |
|
619 |
|
620 </div> |
|
621 <hr /> |
|
622 </div> |
|
623 <div class="" rel="yui:method" resource="#method_on"> |
|
624 <h4> |
|
625 <a name="method_on">on</a></h4> |
|
626 <div class="detail" > |
|
627 <code> |
|
628 |
|
629 |
|
630 |
|
631 |
|
632 <strong property="yui:name">on</strong> |
|
633 ( |
|
634 |
|
635 |
|
636 type |
|
637 |
|
638 |
|
639 , |
|
640 fn |
|
641 |
|
642 |
|
643 ) |
|
644 </code> |
|
645 |
|
646 <div class="description" property="yui:description"> |
|
647 Subscribe to a custom event hosted by this object |
|
648 </div> |
|
649 |
|
650 <div class="description"> |
|
651 |
|
652 <dl rel="yui:parameters"> |
|
653 <dt>Parameters:</dt> |
|
654 <dd rel="yui:parameter"> |
|
655 <code><span property="yui:name">type</span> |
|
656 <<span property="yui:type">string</span>> |
|
657 </code> |
|
658 <span property="yui:description"> The type of the event</span> |
|
659 </dd> |
|
660 <dd rel="yui:parameter"> |
|
661 <code><span property="yui:name">fn</span> |
|
662 <<span property="yui:type">Function</span>> |
|
663 </code> |
|
664 <span property="yui:description"> The callback</span> |
|
665 </dd> |
|
666 </dl> |
|
667 |
|
668 |
|
669 |
|
670 |
|
671 |
|
672 </div> |
|
673 |
|
674 </div> |
|
675 <hr /> |
|
676 </div> |
|
677 <div class="" rel="yui:method" resource="#method_publish"> |
|
678 <h4> |
|
679 <a name="method_publish">publish</a></h4> |
|
680 <div class="detail" > |
|
681 <code> |
|
682 |
|
683 |
|
684 |
|
685 Event.Custom |
|
686 <strong property="yui:name">publish</strong> |
|
687 ( |
|
688 |
|
689 |
|
690 type |
|
691 |
|
692 |
|
693 , |
|
694 opts |
|
695 |
|
696 |
|
697 ) |
|
698 </code> |
|
699 |
|
700 <div class="description" property="yui:description"> |
|
701 Creates a new custom event of the specified type. If a custom event |
|
702 by that name already exists, it will not be re-created. In either |
|
703 case the custom event is returned. |
|
704 </div> |
|
705 |
|
706 <div class="description"> |
|
707 |
|
708 <dl rel="yui:parameters"> |
|
709 <dt>Parameters:</dt> |
|
710 <dd rel="yui:parameter"> |
|
711 <code><span property="yui:name">type</span> |
|
712 <<span property="yui:type">string</span>> |
|
713 </code> |
|
714 <span property="yui:description"> the type, or name of the event</span> |
|
715 </dd> |
|
716 <dd rel="yui:parameter"> |
|
717 <code><span property="yui:name">opts</span> |
|
718 <<span property="yui:type">object</span>> |
|
719 </code> |
|
720 <span property="yui:description"> optional config params. Valid properties are: |
|
721 <ul> |
|
722 <li> |
|
723 'broadcast': whether or not the YUI instance and YUI global are notified when the event is fired (false) |
|
724 </li> |
|
725 <li> |
|
726 'bubbles': whether or not this event bubbles (true) |
|
727 </li> |
|
728 <li> |
|
729 'context': the default execution context for the listeners (this) |
|
730 </li> |
|
731 <li> |
|
732 'defaultFn': the default function to execute when this event fires if preventDefault was not called |
|
733 </li> |
|
734 <li> |
|
735 'emitFacade': whether or not this event emits a facade (false) |
|
736 </li> |
|
737 <li> |
|
738 'prefix': the prefix for this targets events, e.g., 'menu' in 'menu:click' |
|
739 </li> |
|
740 <li> |
|
741 'fireOnce': if an event is configured to fire once, new subscribers after |
|
742 the fire will be notified immediately. |
|
743 </li> |
|
744 <li> |
|
745 'preventable': whether or not preventDefault() has an effect (true) |
|
746 </li> |
|
747 <li> |
|
748 'preventedFn': a function that is executed when preventDefault is called |
|
749 </li> |
|
750 <li> |
|
751 'queuable': whether or not this event can be queued during bubbling (false) |
|
752 </li> |
|
753 <li> |
|
754 'silent': if silent is true, debug messages are not provided for this event. |
|
755 </li> |
|
756 <li> |
|
757 'stoppedFn': a function that is executed when stopPropagation is called |
|
758 </li> |
|
759 <li> |
|
760 'type': the event type (valid option if not provided as the first parameter to publish) |
|
761 </li> |
|
762 </ul></span> |
|
763 </dd> |
|
764 </dl> |
|
765 |
|
766 <dl> |
|
767 <dt>Returns: |
|
768 <code property="yui:return"> |
|
769 Event.Custom |
|
770 </code></dt> |
|
771 <dd property="yui:returnInfo">the custom event</dd> |
|
772 </dl> |
|
773 |
|
774 |
|
775 |
|
776 |
|
777 </div> |
|
778 |
|
779 </div> |
|
780 <hr /> |
|
781 </div> |
|
782 <div class="" rel="yui:method" resource="#method_removeTarget"> |
|
783 <h4> |
|
784 <a name="method_removeTarget">removeTarget</a></h4> |
|
785 <div class="detail" > |
|
786 <code> |
|
787 |
|
788 |
|
789 |
|
790 void |
|
791 <strong property="yui:name">removeTarget</strong> |
|
792 ( |
|
793 |
|
794 |
|
795 o |
|
796 |
|
797 |
|
798 ) |
|
799 </code> |
|
800 |
|
801 <div class="description" property="yui:description"> |
|
802 Removes a bubble target |
|
803 </div> |
|
804 |
|
805 <div class="description"> |
|
806 |
|
807 <dl rel="yui:parameters"> |
|
808 <dt>Parameters:</dt> |
|
809 <dd rel="yui:parameter"> |
|
810 <code><span property="yui:name">o</span> |
|
811 <<span property="yui:type">EventTarget</span>> |
|
812 </code> |
|
813 <span property="yui:description"> the target to remove</span> |
|
814 </dd> |
|
815 </dl> |
|
816 |
|
817 <dl> |
|
818 <dt>Returns: |
|
819 <code property="yui:return"> |
|
820 void |
|
821 </code></dt> |
|
822 <dd property="yui:returnInfo"></dd> |
|
823 </dl> |
|
824 |
|
825 |
|
826 |
|
827 |
|
828 </div> |
|
829 |
|
830 </div> |
|
831 <hr /> |
|
832 </div> |
|
833 <div class=" deprecated" rel="yui:method" resource="#method_subscribe"> |
|
834 <h4> |
|
835 <a name="method_subscribe">subscribe</a></h4> |
|
836 <div class="detail" > |
|
837 <code> |
|
838 |
|
839 |
|
840 |
|
841 void |
|
842 <strong property="yui:name">subscribe</strong> |
|
843 ( |
|
844 ) |
|
845 </code> |
|
846 |
|
847 <div class="description" property="yui:description"> |
|
848 subscribe to an event |
|
849 </div> |
|
850 |
|
851 <div class="description"> |
|
852 |
|
853 |
|
854 <dl> |
|
855 <dt>Returns: |
|
856 <code property="yui:return"> |
|
857 void |
|
858 </code></dt> |
|
859 <dd property="yui:returnInfo"></dd> |
|
860 </dl> |
|
861 |
|
862 |
|
863 |
|
864 <div class="deprecated"> |
|
865 <strong>Deprecated</strong> use on |
|
866 </div> |
|
867 |
|
868 </div> |
|
869 |
|
870 </div> |
|
871 <hr /> |
|
872 </div> |
|
873 <div class=" deprecated" rel="yui:method" resource="#method_unsubscribe"> |
|
874 <h4> |
|
875 <a name="method_unsubscribe">unsubscribe</a></h4> |
|
876 <div class="detail" > |
|
877 <code> |
|
878 |
|
879 |
|
880 |
|
881 void |
|
882 <strong property="yui:name">unsubscribe</strong> |
|
883 ( |
|
884 ) |
|
885 </code> |
|
886 |
|
887 <div class="description" property="yui:description"> |
|
888 detach a listener |
|
889 </div> |
|
890 |
|
891 <div class="description"> |
|
892 |
|
893 |
|
894 <dl> |
|
895 <dt>Returns: |
|
896 <code property="yui:return"> |
|
897 void |
|
898 </code></dt> |
|
899 <dd property="yui:returnInfo"></dd> |
|
900 </dl> |
|
901 |
|
902 |
|
903 |
|
904 <div class="deprecated"> |
|
905 <strong>Deprecated</strong> use detach |
|
906 </div> |
|
907 |
|
908 </div> |
|
909 |
|
910 </div> |
|
911 <hr /> |
|
912 </div> |
|
913 <div class=" deprecated" rel="yui:method" resource="#method_unsubscribeAll"> |
|
914 <h4> |
|
915 <a name="method_unsubscribeAll">unsubscribeAll</a></h4> |
|
916 <div class="detail" > |
|
917 <code> |
|
918 |
|
919 |
|
920 |
|
921 void |
|
922 <strong property="yui:name">unsubscribeAll</strong> |
|
923 ( |
|
924 |
|
925 |
|
926 type |
|
927 |
|
928 |
|
929 ) |
|
930 </code> |
|
931 |
|
932 <div class="description" property="yui:description"> |
|
933 Removes all listeners from the specified event. If the event type |
|
934 is not specified, all listeners from all hosted custom events will |
|
935 be removed. |
|
936 </div> |
|
937 |
|
938 <div class="description"> |
|
939 |
|
940 <dl rel="yui:parameters"> |
|
941 <dt>Parameters:</dt> |
|
942 <dd rel="yui:parameter"> |
|
943 <code><span property="yui:name">type</span> |
|
944 <<span property="yui:type">string</span>> |
|
945 </code> |
|
946 <span property="yui:description"> The type, or name of the event</span> |
|
947 </dd> |
|
948 </dl> |
|
949 |
|
950 <dl> |
|
951 <dt>Returns: |
|
952 <code property="yui:return"> |
|
953 void |
|
954 </code></dt> |
|
955 <dd property="yui:returnInfo"></dd> |
|
956 </dl> |
|
957 |
|
958 |
|
959 |
|
960 <div class="deprecated"> |
|
961 <strong>Deprecated</strong> use detachAll |
|
962 </div> |
|
963 |
|
964 </div> |
|
965 |
|
966 </div> |
|
967 <hr /> |
|
968 </div> |
|
969 </div> |
|
970 </div> |
|
971 |
|
972 </div> |
|
973 |
|
974 <div rel="yui:events" resource="#events"> |
|
975 |
|
976 |
|
977 </div> |
|
978 |
|
979 <div rel="yui:attributes" resource="#configattributes"> |
|
980 |
|
981 </div> |
|
982 |
|
983 </div> |
|
984 </div> |
|
985 <div class="yui-b"> |
|
986 <div class="nav"> |
|
987 |
|
988 <div id="moduleList" class="module"> |
|
989 <h4>Modules</h4> |
|
990 <ul class="content"> |
|
991 <li class=""><a href="module_anim.html" title="anim">anim</a></li> |
|
992 <li class=""><a href="module_attribute.html" title="attribute">attribute</a></li> |
|
993 <li class=""><a href="module_base.html" title="base">base</a></li> |
|
994 <li class=""><a href="module_cache.html" title="cache">cache</a></li> |
|
995 <li class=""><a href="module_classnamemanager.html" title="classnamemanager">classnamemanager</a></li> |
|
996 <li class=""><a href="module_collection.html" title="collection">collection</a></li> |
|
997 <li class=""><a href="module_console.html" title="console">console</a></li> |
|
998 <li class=""><a href="module_console-filters.html" title="console-filters">console-filters</a></li> |
|
999 <li class=""><a href="module_cookie.html" title="cookie">cookie</a></li> |
|
1000 <li class=""><a href="module_dataschema.html" title="dataschema">dataschema</a></li> |
|
1001 <li class=""><a href="module_datasource.html" title="datasource">datasource</a></li> |
|
1002 <li class=""><a href="module_datatype.html" title="datatype">datatype</a></li> |
|
1003 <li class=""><a href="module_dd.html" title="dd">dd</a></li> |
|
1004 <li class=""><a href="module_dom.html" title="dom">dom</a></li> |
|
1005 <li class=""><a href="module_dump.html" title="dump">dump</a></li> |
|
1006 <li class=""><a href="module_event.html" title="event">event</a></li> |
|
1007 <li class="selected"><a href="module_event-custom.html" title="event-custom">event-custom</a></li> |
|
1008 <li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li> |
|
1009 <li class=""><a href="module_history.html" title="history">history</a></li> |
|
1010 <li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li> |
|
1011 <li class=""><a href="module_io.html" title="io">io</a></li> |
|
1012 <li class=""><a href="module_json.html" title="json">json</a></li> |
|
1013 <li class=""><a href="module_node.html" title="node">node</a></li> |
|
1014 <li class=""><a href="module_node-focusmanager.html" title="node-focusmanager">node-focusmanager</a></li> |
|
1015 <li class=""><a href="module_node-menunav.html" title="node-menunav">node-menunav</a></li> |
|
1016 <li class=""><a href="module_oop.html" title="oop">oop</a></li> |
|
1017 <li class=""><a href="module_overlay.html" title="overlay">overlay</a></li> |
|
1018 <li class=""><a href="module_plugin.html" title="plugin">plugin</a></li> |
|
1019 <li class=""><a href="module_profiler.html" title="profiler">profiler</a></li> |
|
1020 <li class=""><a href="module_queue.html" title="queue">queue</a></li> |
|
1021 <li class=""><a href="module_slider.html" title="slider">slider</a></li> |
|
1022 <li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li> |
|
1023 <li class=""><a href="module_substitute.html" title="substitute">substitute</a></li> |
|
1024 <li class=""><a href="module_test.html" title="test">test</a></li> |
|
1025 <li class=""><a href="module_widget.html" title="widget">widget</a></li> |
|
1026 <li class=""><a href="module_widget-position.html" title="widget-position">widget-position</a></li> |
|
1027 <li class=""><a href="module_widget-position-ext.html" title="widget-position-ext">widget-position-ext</a></li> |
|
1028 <li class=""><a href="module_widget-stack.html" title="widget-stack">widget-stack</a></li> |
|
1029 <li class=""><a href="module_widget-stdmod.html" title="widget-stdmod">widget-stdmod</a></li> |
|
1030 <li class=""><a href="module_yui.html" title="yui">yui</a></li> |
|
1031 </ul> |
|
1032 </div> |
|
1033 |
|
1034 <div id="classList" class="module"> |
|
1035 <h4>Classes</h4> |
|
1036 <ul class="content"> |
|
1037 <li class=""><a href="CustomEvent.html" title="CustomEvent">CustomEvent</a></li> |
|
1038 <li class=""><a href="Do.html" title="Do">Do</a></li> |
|
1039 <li class=""><a href="Do.AlterArgs.html" title="Do.AlterArgs">Do.AlterArgs</a></li> |
|
1040 <li class=""><a href="Do.AlterReturn.html" title="Do.AlterReturn">Do.AlterReturn</a></li> |
|
1041 <li class=""><a href="Do.Error.html" title="Do.Error">Do.Error</a></li> |
|
1042 <li class=""><a href="Do.Halt.html" title="Do.Halt">Do.Halt</a></li> |
|
1043 <li class=""><a href="Do.Method.html" title="Do.Method">Do.Method</a></li> |
|
1044 <li class=""><a href="Do.Prevent.html" title="Do.Prevent">Do.Prevent</a></li> |
|
1045 <li class=""><a href="EventFacade.html" title="EventFacade">EventFacade</a></li> |
|
1046 <li class=""><a href="EventHandle.html" title="EventHandle">EventHandle</a></li> |
|
1047 <li class="selected"><a href="EventTarget.html" title="EventTarget">EventTarget</a></li> |
|
1048 <li class=""><a href="Subscriber.html" title="Subscriber">Subscriber</a></li> |
|
1049 </ul> |
|
1050 </div> |
|
1051 |
|
1052 <div id="fileList" class="module"> |
|
1053 <h4>Files</h4> |
|
1054 <ul class="content"> |
|
1055 <li class=""><a href="event-custom.js.html" title="event-custom.js">event-custom.js</a></li> |
|
1056 <li class=""><a href="event-do.js.html" title="event-do.js">event-do.js</a></li> |
|
1057 <li class=""><a href="event-facade.js.html" title="event-facade.js">event-facade.js</a></li> |
|
1058 <li class=""><a href="event-target.js.html" title="event-target.js">event-target.js</a></li> |
|
1059 <li class=""><a href="event.js.html" title="event.js">event.js</a></li> |
|
1060 </ul> |
|
1061 </div> |
|
1062 |
|
1063 |
|
1064 <div id="methodsList" class="module"> |
|
1065 <h4>Methods</h4> |
|
1066 <ul class="content"> |
|
1067 <li class="private"><a href="#method__getType" title="_getType">_getType</a></li> |
|
1068 <li class="private"><a href="#method__parseType" title="_parseType">_parseType</a></li> |
|
1069 <li class=""><a href="#method_addTarget" title="addTarget">addTarget</a></li> |
|
1070 <li class=""><a href="#method_after" title="after">after</a></li> |
|
1071 <li class=" deprecated"><a href="#method_before" title="before">before</a></li> |
|
1072 <li class=""><a href="#method_bubble" title="bubble">bubble</a></li> |
|
1073 <li class=""><a href="#method_detach" title="detach">detach</a></li> |
|
1074 <li class=""><a href="#method_detachAll" title="detachAll">detachAll</a></li> |
|
1075 <li class=""><a href="#method_fire" title="fire">fire</a></li> |
|
1076 <li class=""><a href="#method_getEvent" title="getEvent">getEvent</a></li> |
|
1077 <li class=""><a href="#method_on" title="on">on</a></li> |
|
1078 <li class=""><a href="#method_publish" title="publish">publish</a></li> |
|
1079 <li class=""><a href="#method_removeTarget" title="removeTarget">removeTarget</a></li> |
|
1080 <li class=" deprecated"><a href="#method_subscribe" title="subscribe">subscribe</a></li> |
|
1081 <li class=" deprecated"><a href="#method_unsubscribe" title="unsubscribe">unsubscribe</a></li> |
|
1082 <li class=" deprecated"><a href="#method_unsubscribeAll" title="unsubscribeAll">unsubscribeAll</a></li> |
|
1083 </ul> |
|
1084 </div> |
|
1085 |
|
1086 |
|
1087 |
|
1088 </div> |
|
1089 </div> |
|
1090 </div> |
|
1091 <div id="ft"> |
|
1092 <hr /> |
|
1093 Copyright © 2009 Yahoo! Inc. All rights reserved. |
|
1094 </div> |
|
1095 </div> |
|
1096 <script type="text/javascript"> |
|
1097 ALL_YUI_PROPS = [{"access": "", "host": "EventTarget", "name": "addTarget", "url": "EventTarget.html#method_addTarget", "type": "method"}, {"access": "", "host": "EventTarget", "name": "after", "url": "EventTarget.html#method_after", "type": "method"}, {"access": "", "host": "EventTarget", "name": "before", "url": "EventTarget.html#method_before", "type": "method"}, {"access": "", "host": "EventTarget", "name": "bubble", "url": "EventTarget.html#method_bubble", "type": "method"}, {"access": "", "host": "EventFacade", "name": "currentTarget", "url": "EventFacade.html#property_currentTarget", "type": "property"}, {"access": "", "host": "EventTarget", "name": "detach", "url": "EventTarget.html#method_detach", "type": "method"}, {"access": "", "host": "EventTarget", "name": "detachAll", "url": "EventTarget.html#method_detachAll", "type": "method"}, {"access": "", "host": "EventFacade", "name": "details", "url": "EventFacade.html#property_details", "type": "property"}, {"access": "", "host": "EventTarget", "name": "fire", "url": "EventTarget.html#method_fire", "type": "method"}, {"access": "", "host": "EventTarget", "name": "getEvent", "url": "EventTarget.html#method_getEvent", "type": "method"}, {"access": "private", "host": "EventTarget", "name": "_getType", "url": "EventTarget.html#method__getType", "type": "method"}, {"access": "", "host": "EventFacade", "name": "halt", "url": "EventFacade.html#method_halt", "type": "method"}, {"access": "", "host": "EventTarget", "name": "on", "url": "EventTarget.html#method_on", "type": "method"}, {"access": "private", "host": "EventTarget", "name": "_parseType", "url": "EventTarget.html#method__parseType", "type": "method"}, {"access": "", "host": "EventFacade", "name": "preventDefault", "url": "EventFacade.html#method_preventDefault", "type": "method"}, {"access": "", "host": "EventTarget", "name": "publish", "url": "EventTarget.html#method_publish", "type": "method"}, {"access": "", "host": "EventFacade", "name": "relatedTarget", "url": "EventFacade.html#property_relatedTarget", "type": "property"}, {"access": "", "host": "EventTarget", "name": "removeTarget", "url": "EventTarget.html#method_removeTarget", "type": "method"}, {"access": "", "host": "EventFacade", "name": "stopImmediatePropagation", "url": "EventFacade.html#method_stopImmediatePropagation", "type": "method"}, {"access": "", "host": "EventFacade", "name": "stopPropagation", "url": "EventFacade.html#method_stopPropagation", "type": "method"}, {"access": "", "host": "EventTarget", "name": "subscribe", "url": "EventTarget.html#method_subscribe", "type": "method"}, {"access": "", "host": "EventFacade", "name": "target", "url": "EventFacade.html#property_target", "type": "property"}, {"access": "", "host": "EventFacade", "name": "type", "url": "EventFacade.html#property_type", "type": "property"}, {"access": "", "host": "EventTarget", "name": "unsubscribe", "url": "EventTarget.html#method_unsubscribe", "type": "method"}, {"access": "", "host": "EventTarget", "name": "unsubscribeAll", "url": "EventTarget.html#method_unsubscribeAll", "type": "method"}]; |
|
1098 </script> |
|
1099 </body> |
|
1100 </html> |