{"action":"created","issue":{"url":"https://api.github.com/repos/openlayers/ol3/issues/3994","labels_url":"https://api.github.com/repos/openlayers/ol3/issues/3994/labels{/name}","comments_url":"https://api.github.com/repos/openlayers/ol3/issues/3994/comments","events_url":"https://api.github.com/repos/openlayers/ol3/issues/3994/events","html_url":"https://github.com/openlayers/ol3/issues/3994","id":100307033,"number":3994,"title":"ol.Object no longer expose dispatchEvent() method in release version since v3.8.X","user":{"login":"kulmegil","id":570575,"avatar_url":"https://avatars.githubusercontent.com/u/570575?v=3","gravatar_id":"","url":"https://api.github.com/users/kulmegil","html_url":"https://github.com/kulmegil","followers_url":"https://api.github.com/users/kulmegil/followers","following_url":"https://api.github.com/users/kulmegil/following{/other_user}","gists_url":"https://api.github.com/users/kulmegil/gists{/gist_id}","starred_url":"https://api.github.com/users/kulmegil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kulmegil/subscriptions","organizations_url":"https://api.github.com/users/kulmegil/orgs","repos_url":"https://api.github.com/users/kulmegil/repos","events_url":"https://api.github.com/users/kulmegil/events{/privacy}","received_events_url":"https://api.github.com/users/kulmegil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-08-11T13:07:49Z","updated_at":"2015-08-25T11:27:27Z","closed_at":null,"body":"ol.Object no longer exposes dispatchEvent() - something I relied until 3.7.0 even though it was undocumented. This makes extending ol.* classes even harder then it already was - without closure compiling app along with library.\r\n\r\nps It would be nice if ol.interaction.Interaction could expose it's getMap() method as well."},"comment":{"url":"https://api.github.com/repos/openlayers/ol3/issues/comments/134559084","html_url":"https://github.com/openlayers/ol3/issues/3994#issuecomment-134559084","issue_url":"https://api.github.com/repos/openlayers/ol3/issues/3994","id":134559084,"user":{"login":"jonataswalker","id":10571881,"avatar_url":"https://avatars.githubusercontent.com/u/10571881?v=3","gravatar_id":"","url":"https://api.github.com/users/jonataswalker","html_url":"https://github.com/jonataswalker","followers_url":"https://api.github.com/users/jonataswalker/followers","following_url":"https://api.github.com/users/jonataswalker/following{/other_user}","gists_url":"https://api.github.com/users/jonataswalker/gists{/gist_id}","starred_url":"https://api.github.com/users/jonataswalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonataswalker/subscriptions","organizations_url":"https://api.github.com/users/jonataswalker/orgs","repos_url":"https://api.github.com/users/jonataswalker/repos","events_url":"https://api.github.com/users/jonataswalker/events{/privacy}","received_events_url":"https://api.github.com/users/jonataswalker/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T11:27:27Z","updated_at":"2015-08-25T11:27:27Z","body":"In the case @marlowp raised (http://gis.stackexchange.com/q/159419/50718), it's an extended `ol.control.Control` so events can be managed with something like:\r\n\r\n```javascript\r\nvar Geocoder = function(opt_options){\r\n    'use strict';\r\n    //....\r\n    ol.control.Control.call(this, {\r\n        element: container\r\n    });\r\n    //set event to be captured with 'change:geocoder'\r\n    this.set('geocoder', '');\r\n};\r\n\r\nol.inherits(Geocoder, ol.control.Control);\r\n\r\nGeocoder.prototype.makeSomething = function(){\r\n    //dispatchEvent\r\n    this.set('geocoder', Math.random());\r\n};\r\n```\r\nListen on app:\r\n```javascript\r\nvar geocoder = new Geocoder();\r\nmap.addControl(geocoder);\r\n\r\ngeocoder.on('change:geocoder', function(evt){\r\n    //...\r\n});\r\n```\r\n"}}