EventDispatcher.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../list.js"></script>
  6. <script src="../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <div class="desc">JavaScript events for custom objects.<br />
  12. <a href="https://github.com/mrdoob/eventdispatcher.js">https://github.com/mrdoob/eventdispatcher.js</a></div>
  13. <h2>Constructor</h2>
  14. <h3>[name]()</h3>
  15. <div>
  16. Creates EventDispatcher object.
  17. </div>
  18. <h2>Methods</h2>
  19. <h3>.addEventListener( [page:String type], [page:Function listener] )</h3>
  20. <div>
  21. type - The type of event to listen to.<br />
  22. listener - The function that gets called when the event is fired.
  23. </div>
  24. <div>
  25. Adds a listener to an event type.
  26. </div>
  27. <h3>.hasEventListener( [page:String type], [page:Function listener] )</h3>
  28. <div>
  29. type - The type of event to listen to.<br />
  30. listener - The function that gets called when the event is fired.
  31. </div>
  32. <div>
  33. Checks if listener is added to an event type.
  34. </div>
  35. <h3>.removeEventListener( [page:String type], [page:Function listener] )</h3>
  36. <div>
  37. type - The type of the listener that gets removed.<br />
  38. listener - The listener function that gets removed.
  39. </div>
  40. <div>
  41. Removes a listener from an event type.
  42. </div>
  43. <h3>.dispatchEvent( [page:String type] )</h3>
  44. <div>
  45. type - The type of event that gets fired.
  46. </div>
  47. <div>
  48. Fire an event type.
  49. </div>
  50. <h2>Source</h2>
  51. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  52. </body>
  53. </html>