{"action":"created","issue":{"url":"https://api.github.com/repos/KartikTalwar/gmail.js/issues/148","labels_url":"https://api.github.com/repos/KartikTalwar/gmail.js/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/KartikTalwar/gmail.js/issues/148/comments","events_url":"https://api.github.com/repos/KartikTalwar/gmail.js/issues/148/events","html_url":"https://github.com/KartikTalwar/gmail.js/issues/148","id":59484826,"number":148,"title":"Set to: cc: bcc: on api.dom.compose object","user":{"login":"lievenjanssen","id":958643,"avatar_url":"https://avatars.githubusercontent.com/u/958643?v=3","gravatar_id":"","url":"https://api.github.com/users/lievenjanssen","html_url":"https://github.com/lievenjanssen","followers_url":"https://api.github.com/users/lievenjanssen/followers","following_url":"https://api.github.com/users/lievenjanssen/following{/other_user}","gists_url":"https://api.github.com/users/lievenjanssen/gists{/gist_id}","starred_url":"https://api.github.com/users/lievenjanssen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lievenjanssen/subscriptions","organizations_url":"https://api.github.com/users/lievenjanssen/orgs","repos_url":"https://api.github.com/users/lievenjanssen/repos","events_url":"https://api.github.com/users/lievenjanssen/events{/privacy}","received_events_url":"https://api.github.com/users/lievenjanssen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-02T14:05:32Z","updated_at":"2015-03-03T11:23:41Z","closed_at":null,"body":"In the code there is a comment on the to: cc: and bcc: fields (TODO: ability to set)\r\n\r\nAre there any plans to implement the to: cc: bcc: in the near future?"},"comment":{"url":"https://api.github.com/repos/KartikTalwar/gmail.js/issues/comments/76928497","html_url":"https://github.com/KartikTalwar/gmail.js/issues/148#issuecomment-76928497","issue_url":"https://api.github.com/repos/KartikTalwar/gmail.js/issues/148","id":76928497,"user":{"login":"brentkelly","id":2694025,"avatar_url":"https://avatars.githubusercontent.com/u/2694025?v=3","gravatar_id":"","url":"https://api.github.com/users/brentkelly","html_url":"https://github.com/brentkelly","followers_url":"https://api.github.com/users/brentkelly/followers","following_url":"https://api.github.com/users/brentkelly/following{/other_user}","gists_url":"https://api.github.com/users/brentkelly/gists{/gist_id}","starred_url":"https://api.github.com/users/brentkelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentkelly/subscriptions","organizations_url":"https://api.github.com/users/brentkelly/orgs","repos_url":"https://api.github.com/users/brentkelly/repos","events_url":"https://api.github.com/users/brentkelly/events{/privacy}","received_events_url":"https://api.github.com/users/brentkelly/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T11:23:40Z","updated_at":"2015-03-03T11:23:40Z","body":"@lievenjanssen - OK the mouse event thread I was referring to is #117 which seems to work fine for triggering the search.\r\n\r\nI tried this approach here but it doesn't seem to work for me. I don't have much experience at simulating click events some perhaps someone knows more.\r\n\r\n```javascript\r\n\r\n// set email textarea field\r\n$('textarea[name=to]').val('my@email.com');\r\n\r\n// try to simulate a click on the subject input - doesn't work\r\nvar mouseUp = document.createEvent('MouseEvents');\r\nmouseUp.initEvent( 'click', true, false );\r\n$('input[name=subjectbox]')[0].dispatchEvent(mouseUp);\r\n\r\n// try give focus to the subject input - doesn't work\r\n$('input[name=subjectbox]').focus();\r\n```\r\n\r\nAside from that approach, I'm sure really how you could implement this functionality without re-implementing the Gmail interface by recreate the entire DOM tree - including click & drag events - that Gmail creates when you add a to address. Unless Gmail is nice enough to apply those events automatically to all elements with a specific class name. I haven't tested that but I'd be very surprised, and even if it did, that would be some seriously brittle code :)."}}