{"action":"created","issue":{"url":"https://api.github.com/repos/alexgibson/shake.js/issues/30","labels_url":"https://api.github.com/repos/alexgibson/shake.js/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/alexgibson/shake.js/issues/30/comments","events_url":"https://api.github.com/repos/alexgibson/shake.js/issues/30/events","html_url":"https://github.com/alexgibson/shake.js/issues/30","id":107870223,"number":30,"title":"passing custom data/parameter to shake event","user":{"login":"sharp-c","id":8975144,"avatar_url":"https://avatars.githubusercontent.com/u/8975144?v=3","gravatar_id":"","url":"https://api.github.com/users/sharp-c","html_url":"https://github.com/sharp-c","followers_url":"https://api.github.com/users/sharp-c/followers","following_url":"https://api.github.com/users/sharp-c/following{/other_user}","gists_url":"https://api.github.com/users/sharp-c/gists{/gist_id}","starred_url":"https://api.github.com/users/sharp-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharp-c/subscriptions","organizations_url":"https://api.github.com/users/sharp-c/orgs","repos_url":"https://api.github.com/users/sharp-c/repos","events_url":"https://api.github.com/users/sharp-c/events{/privacy}","received_events_url":"https://api.github.com/users/sharp-c/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-23T08:13:45Z","updated_at":"2015-11-26T07:16:51Z","closed_at":null,"body":"sometimes, we need feedback after a shake event, for example, if I can pass shake \"strength\" to the event, I can do lots of things according to the \"strength\".\r\n\r\nI know we can pass a object named \"detail\" when create new CustomEvent\r\n```javascript\r\nthis.event = new CustomEvent('shake', {\r\n                bubbles: true,\r\n                cancelable: true,\r\n                \"detail\":{\"strength\":0}\r\n            });\r\n```\r\nbut when we use ` document.createEvent`:\r\n```javascript\r\nthis.event = document.createEvent('Event');\r\n            this.event.initEvent('shake', true, true); \r\n```\r\nI found that it works on my iphone (IOS7.1) and android(V4.4) by adding this line:\r\n```javascript\r\n this.event.detail={};\r\n```\r\nBut it seems this is  ***not documented***  in any official specifications.\r\nSo, my question:  is there a good solution to pass custom parameters for `document.createEvent`, thank you.  \r\n   "},"comment":{"url":"https://api.github.com/repos/alexgibson/shake.js/issues/comments/159832565","html_url":"https://github.com/alexgibson/shake.js/issues/30#issuecomment-159832565","issue_url":"https://api.github.com/repos/alexgibson/shake.js/issues/30","id":159832565,"user":{"login":"alexgibson","id":400117,"avatar_url":"https://avatars.githubusercontent.com/u/400117?v=3","gravatar_id":"","url":"https://api.github.com/users/alexgibson","html_url":"https://github.com/alexgibson","followers_url":"https://api.github.com/users/alexgibson/followers","following_url":"https://api.github.com/users/alexgibson/following{/other_user}","gists_url":"https://api.github.com/users/alexgibson/gists{/gist_id}","starred_url":"https://api.github.com/users/alexgibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexgibson/subscriptions","organizations_url":"https://api.github.com/users/alexgibson/orgs","repos_url":"https://api.github.com/users/alexgibson/repos","events_url":"https://api.github.com/users/alexgibson/events{/privacy}","received_events_url":"https://api.github.com/users/alexgibson/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T07:16:51Z","updated_at":"2015-11-26T07:16:51Z","body":"You need to actually pass the event data. This is not a feature that's yet in the master branch."}}