{"action":"opened","issue":{"url":"https://api.github.com/repos/ajakubo1/CanvasMenu/issues/16","labels_url":"https://api.github.com/repos/ajakubo1/CanvasMenu/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/ajakubo1/CanvasMenu/issues/16/comments","events_url":"https://api.github.com/repos/ajakubo1/CanvasMenu/issues/16/events","html_url":"https://github.com/ajakubo1/CanvasMenu/issues/16","id":124063150,"number":16,"title":"Remove automagic menu switching from the background","user":{"login":"michalbe","id":347657,"avatar_url":"https://avatars.githubusercontent.com/u/347657?v=3","gravatar_id":"","url":"https://api.github.com/users/michalbe","html_url":"https://github.com/michalbe","followers_url":"https://api.github.com/users/michalbe/followers","following_url":"https://api.github.com/users/michalbe/following{/other_user}","gists_url":"https://api.github.com/users/michalbe/gists{/gist_id}","starred_url":"https://api.github.com/users/michalbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalbe/subscriptions","organizations_url":"https://api.github.com/users/michalbe/orgs","repos_url":"https://api.github.com/users/michalbe/repos","events_url":"https://api.github.com/users/michalbe/events{/privacy}","received_events_url":"https://api.github.com/users/michalbe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-28T12:40:35Z","updated_at":"2015-12-28T12:40:35Z","closed_at":null,"body":"Setting new menu as a listener to switch between menus is not very clear. Setting a listener that will initiate the menu on fly will be more clear and self explanatory, without unneeded magic happening on the backstage.\r\nSo \r\n```javascript\r\noptionsButton.clickHandler(optionsMenu);\r\n```\r\n\r\nwill became:\r\n```javascript\r\noptionsButton.on('click', optionsMenu.init);\r\n```\r\n\r\nThis will simplify events handling in the library's code, and give more explicit control to the end user."}}