openlayers/ol3 — pull request #929 by elemoine (2013-08-27 20:19:07+00:00)
Title: Add ol.CollectionEvent#getElement

ol.Collection objects trigger "add" and "remove" events when element are added to, and removed from, the collection. This is very useful; to be notified when layers are added/removed to/from the map for example. Currently, applications using ol.js can register "add" and "remove" listeners, but they cannot get a reference to the element to which "add" and "remove" events pertain. Quite annoying. This PR adds a getElement method to ol.Collection, and export it.