Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 402480

Summary: Do we really need two EventTarget implementations?
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2013-03-05 16:07:03 EST
There are currently 2 different event-target implementations:
 1. bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js
 2. bundles/org.eclipse.orion.client.core/web/orion/EventTarget.js

They have very similar API, with a few differences:
- addMixin() vs. attach() for turning an object into an event target
- The editor one supports 'useCapture' parameter in addEventListener (ala W3C DOM2 API)
- The editor one provides an #isListening method
- The core one swallows exceptions thrown by listeners (so a listener is guaranteed to receive notification of an event even when an earlier listener in the list throws an exception).
- The editor implementation seems more complex, there's a bunch of 'state' and 'compact' code I don't understand

Perhaps these can be merged into 1 file...
Comment 1 John Arthorne CLA 2015-05-05 14:43:20 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html