EventDispatcher.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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>Properties</h2>
  19. <h2>Methods</h2>
  20. <h3>.addEventListener( [page:String type], [page:Function listener] )</h3>
  21. <div>
  22. type - The type of event to listen to.<br />
  23. listener - The function that gets called when the event is fired.
  24. </div>
  25. <div>
  26. Adds a listener to an event type.
  27. </div>
  28. <h3>.hasEventListener( [page:String type], [page:Function listener] )</h3>
  29. <div>
  30. type - The type of event to listen to.<br />
  31. listener - The function that gets called when the event is fired.
  32. </div>
  33. <div>
  34. Checks if listener is added to an event type.
  35. </div>
  36. <h3>.removeEventListener( [page:String type], [page:Function listener] )</h3>
  37. <div>
  38. type - The type of the listener that gets removed.<br />
  39. listener - The listener function that gets removed.
  40. </div>
  41. <div>
  42. Removes a listener from an event type.
  43. </div>
  44. <h3>.dispatchEvent( [page:String type] )</h3>
  45. <div>
  46. type - The type of event that gets fired.
  47. </div>
  48. <div>
  49. Fire an event type.
  50. </div>
  51. <h2>Source</h2>
  52. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  53. </body>
  54. </html>