Unique key on components


I have an array of components that I’m passing to a web worker. Since the web worker can’t interact with them directly, I need to send some sort of data back that will tell my main app which component to target. The problem is, components don’t have ids, so how would I pluck a component from an array of components?

Perhaps the elementId is unique enough? What if the component is destroyed while the web worker is working, and new components are instantiated. By the time the web worker returns its message, might there be a new component which happens to have the same elementId?


See also Jeffrey’s Closure Actions screencast :