{"action":"opened","issue":{"url":"https://api.github.com/repos/jupyter/notebook/issues/753","labels_url":"https://api.github.com/repos/jupyter/notebook/issues/753/labels{/name}","comments_url":"https://api.github.com/repos/jupyter/notebook/issues/753/comments","events_url":"https://api.github.com/repos/jupyter/notebook/issues/753/events","html_url":"https://github.com/jupyter/notebook/issues/753","id":118713966,"number":753,"title":"Need a way to find enclosing cell from a dom element on the page","user":{"login":"lbustelo","id":2474841,"avatar_url":"https://avatars.githubusercontent.com/u/2474841?v=3","gravatar_id":"","url":"https://api.github.com/users/lbustelo","html_url":"https://github.com/lbustelo","followers_url":"https://api.github.com/users/lbustelo/followers","following_url":"https://api.github.com/users/lbustelo/following{/other_user}","gists_url":"https://api.github.com/users/lbustelo/gists{/gist_id}","starred_url":"https://api.github.com/users/lbustelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbustelo/subscriptions","organizations_url":"https://api.github.com/users/lbustelo/orgs","repos_url":"https://api.github.com/users/lbustelo/repos","events_url":"https://api.github.com/users/lbustelo/events{/privacy}","received_events_url":"https://api.github.com/users/lbustelo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-24T22:08:46Z","updated_at":"2015-11-24T22:08:46Z","closed_at":null,"body":"For jupyter-incubator/declarativewidgets/issues/125 we needed a way to get a hold of the enclosing cell of one of our elements to then have the correct callbacks to handle messages like `display_data`. \r\n\r\nWe looked around and could not find a better way than to do `$(this).parents(\".cell\").data().cell` (obviously with the right checks). \r\n\r\nIt seems that we should have a utility method that would do this for us somewhere in IPython.notebook. Also, it should be something that would allow Thebe-like environments to also work (something as simple as a well-known method that could be redefined by the environment).\r\n\r\n/cc @Carreau "}}