{"action":"created","issue":{"url":"https://api.github.com/repos/PixelsCommander/ReactiveElements/issues/26","labels_url":"https://api.github.com/repos/PixelsCommander/ReactiveElements/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/PixelsCommander/ReactiveElements/issues/26/comments","events_url":"https://api.github.com/repos/PixelsCommander/ReactiveElements/issues/26/events","html_url":"https://github.com/PixelsCommander/ReactiveElements/issues/26","id":57333689,"number":26,"title":"Add example of triggering DOM events out of react component.","user":{"login":"kof","id":52824,"avatar_url":"https://avatars.githubusercontent.com/u/52824?v=3","gravatar_id":"","url":"https://api.github.com/users/kof","html_url":"https://github.com/kof","followers_url":"https://api.github.com/users/kof/followers","following_url":"https://api.github.com/users/kof/following{/other_user}","gists_url":"https://api.github.com/users/kof/gists{/gist_id}","starred_url":"https://api.github.com/users/kof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kof/subscriptions","organizations_url":"https://api.github.com/users/kof/orgs","repos_url":"https://api.github.com/users/kof/repos","events_url":"https://api.github.com/users/kof/events{/privacy}","received_events_url":"https://api.github.com/users/kof/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-11T15:50:26Z","updated_at":"2015-02-13T14:25:02Z","closed_at":"2015-02-13T14:25:02Z","body":"As we will need to communicate out of react to the rest of the world, I think the most strict forward way would be to trigger DOM events. Here is how it can be done:\r\n\r\n```javascript\r\n    var event = new CustomEvent('change', {\r\n      bubbles: true,\r\n      cancelable: true\r\n    })\r\n    this.getDOMNode().dispatchEvent(event)\r\n```\r\n\r\nbubbles: true is required as react node is a child of our custom element."},"comment":{"url":"https://api.github.com/repos/PixelsCommander/ReactiveElements/issues/comments/74260591","html_url":"https://github.com/PixelsCommander/ReactiveElements/issues/26#issuecomment-74260591","issue_url":"https://api.github.com/repos/PixelsCommander/ReactiveElements/issues/26","id":74260591,"user":{"login":"PixelsCommander","id":810671,"avatar_url":"https://avatars.githubusercontent.com/u/810671?v=3","gravatar_id":"","url":"https://api.github.com/users/PixelsCommander","html_url":"https://github.com/PixelsCommander","followers_url":"https://api.github.com/users/PixelsCommander/followers","following_url":"https://api.github.com/users/PixelsCommander/following{/other_user}","gists_url":"https://api.github.com/users/PixelsCommander/gists{/gist_id}","starred_url":"https://api.github.com/users/PixelsCommander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PixelsCommander/subscriptions","organizations_url":"https://api.github.com/users/PixelsCommander/orgs","repos_url":"https://api.github.com/users/PixelsCommander/repos","events_url":"https://api.github.com/users/PixelsCommander/events{/privacy}","received_events_url":"https://api.github.com/users/PixelsCommander/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T14:25:02Z","updated_at":"2015-02-13T14:25:02Z","body":"Example added to readme"}}