EventDispatcher.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <div class="desc">JavaScript events for custom objects.<br />
  13. <a href="https://github.com/mrdoob/eventdispatcher.js">https://github.com/mrdoob/eventdispatcher.js</a></div>
  14. <h2>Constructor</h2>
  15. <h3>[name]()</h3>
  16. <div>
  17. Creates EventDispatcher object.
  18. </div>
  19. <h2>Methods</h2>
  20. <h3>[method:null 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>[method:Boolean 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>[method:null 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>[method:null dispatchEvent]( [page:object event] )</h3>
  45. <div>
  46. event - The 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>