{"action":"created","issue":{"url":"https://api.github.com/repos/paperjs/paper.js/issues/810","labels_url":"https://api.github.com/repos/paperjs/paper.js/issues/810/labels{/name}","comments_url":"https://api.github.com/repos/paperjs/paper.js/issues/810/comments","events_url":"https://api.github.com/repos/paperjs/paper.js/issues/810/events","html_url":"https://github.com/paperjs/paper.js/issues/810","id":113066751,"number":810,"title":"onFrame (the function) and view.on('frame', function) create separate handlers","user":{"login":"bmacnaughton","id":4171707,"avatar_url":"https://avatars.githubusercontent.com/u/4171707?v=3","gravatar_id":"","url":"https://api.github.com/users/bmacnaughton","html_url":"https://github.com/bmacnaughton","followers_url":"https://api.github.com/users/bmacnaughton/followers","following_url":"https://api.github.com/users/bmacnaughton/following{/other_user}","gists_url":"https://api.github.com/users/bmacnaughton/gists{/gist_id}","starred_url":"https://api.github.com/users/bmacnaughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmacnaughton/subscriptions","organizations_url":"https://api.github.com/users/bmacnaughton/orgs","repos_url":"https://api.github.com/users/bmacnaughton/repos","events_url":"https://api.github.com/users/bmacnaughton/events{/privacy}","received_events_url":"https://api.github.com/users/bmacnaughton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-23T17:45:16Z","updated_at":"2015-10-24T07:23:36Z","closed_at":null,"body":"When I create a frame handler using the syntax `function onFrame(e) {...}` and also create a function using `view.on('frame', function(e) {...})` they both get called on the frame event.\r\n\r\nHere's a sketch demonstrating the issue - each of the two handlers draws different colored circles.\r\n\r\nhttp://sketch.paperjs.org/#S/vZPBTsMwDIZfxeplrTR1wLGIE4gb0iSQOFAOWequ0TK7StJVMO3dSdJuK0IIwYH0kMaO/3x24n1CYotJkTxu0MkmmSeSq7AuyYhKdRZu4PLiuiSJ5ND41U5hn1v1jvm20061+i1dsiKXG0EVb9Ms87tLqjuSTjFBZUR/q4zUmErWbDLYlwR+7ISB36mGKMIelsI1+ag5ioUxiBXjPD87hkyKcZ44rDO8wduA5cPC9MX5rCrXFHA12A9ZSYeQ3mIBrlEWZKSANTobM/WuScIzg9VsqMcx4FQXwp3PPAZKoTVWk5ox3Rt/LSmeijUVXWkhN1E2okgmyxpzzet0VrORCALqEB/3xMriVjnvjMY57A+fmSYQ/mhvQ6hZa+4VrcH1DCHcjlIjm7+zI+43mGuDSP+GGUJPhGeNHxjbzrR6ABgP+zumY9a+KuGBPvnfNFiDzfM8cGfxjnuaVu3cCBG6ro+SxzcWPt+QK4Ni04ZmsEnx8nr4AA=="},"comment":{"url":"https://api.github.com/repos/paperjs/paper.js/issues/comments/150772372","html_url":"https://github.com/paperjs/paper.js/issues/810#issuecomment-150772372","issue_url":"https://api.github.com/repos/paperjs/paper.js/issues/810","id":150772372,"user":{"login":"lehni","id":213275,"avatar_url":"https://avatars.githubusercontent.com/u/213275?v=3","gravatar_id":"","url":"https://api.github.com/users/lehni","html_url":"https://github.com/lehni","followers_url":"https://api.github.com/users/lehni/followers","following_url":"https://api.github.com/users/lehni/following{/other_user}","gists_url":"https://api.github.com/users/lehni/gists{/gist_id}","starred_url":"https://api.github.com/users/lehni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lehni/subscriptions","organizations_url":"https://api.github.com/users/lehni/orgs","repos_url":"https://api.github.com/users/lehni/repos","events_url":"https://api.github.com/users/lehni/events{/privacy}","received_events_url":"https://api.github.com/users/lehni/received_events","type":"User","site_admin":false},"created_at":"2015-10-24T07:23:36Z","updated_at":"2015-10-24T07:23:36Z","body":"It would be difficult to implement that... I think it really depends on how they are explained. If we write that these global functions are installed as `view.onFrame` / `tool.onMouseDown` etc for you, then there is no ambiguity. Keeping this open since the documentation of this should improve."}}