{"action":"created","issue":{"url":"https://api.github.com/repos/MrSwitch/hello.js/issues/211","labels_url":"https://api.github.com/repos/MrSwitch/hello.js/issues/211/labels{/name}","comments_url":"https://api.github.com/repos/MrSwitch/hello.js/issues/211/comments","events_url":"https://api.github.com/repos/MrSwitch/hello.js/issues/211/events","html_url":"https://github.com/MrSwitch/hello.js/issues/211","id":63240370,"number":211,"title":"Use postMessage to close popup instead of .close","user":{"login":"RangerMauve","id":911495,"avatar_url":"https://avatars.githubusercontent.com/u/911495?v=3","gravatar_id":"","url":"https://api.github.com/users/RangerMauve","html_url":"https://github.com/RangerMauve","followers_url":"https://api.github.com/users/RangerMauve/followers","following_url":"https://api.github.com/users/RangerMauve/following{/other_user}","gists_url":"https://api.github.com/users/RangerMauve/gists{/gist_id}","starred_url":"https://api.github.com/users/RangerMauve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RangerMauve/subscriptions","organizations_url":"https://api.github.com/users/RangerMauve/orgs","repos_url":"https://api.github.com/users/RangerMauve/repos","events_url":"https://api.github.com/users/RangerMauve/events{/privacy}","received_events_url":"https://api.github.com/users/RangerMauve/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-20T14:39:15Z","updated_at":"2015-03-20T17:36:06Z","closed_at":null,"body":"I'm getting issues with CORS preventing Hello.JS from being able to close it's popups after the window is finished.\r\n\r\nSince hello.js is being loaded into the window, it should be possible to have it listen for a postMessage call which will trigger it to close itself.\r\n\r\nThis would allow having the redirect hosted on a different domain/protocol than the current app.\r\n\r\nCurrently I'm having issues using this with apps served from the filesystem (embedded in mobile apps for instance) and it'd be nice if this was changed."},"comment":{"url":"https://api.github.com/repos/MrSwitch/hello.js/issues/comments/84082854","html_url":"https://github.com/MrSwitch/hello.js/issues/211#issuecomment-84082854","issue_url":"https://api.github.com/repos/MrSwitch/hello.js/issues/211","id":84082854,"user":{"login":"RangerMauve","id":911495,"avatar_url":"https://avatars.githubusercontent.com/u/911495?v=3","gravatar_id":"","url":"https://api.github.com/users/RangerMauve","html_url":"https://github.com/RangerMauve","followers_url":"https://api.github.com/users/RangerMauve/followers","following_url":"https://api.github.com/users/RangerMauve/following{/other_user}","gists_url":"https://api.github.com/users/RangerMauve/gists{/gist_id}","starred_url":"https://api.github.com/users/RangerMauve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RangerMauve/subscriptions","organizations_url":"https://api.github.com/users/RangerMauve/orgs","repos_url":"https://api.github.com/users/RangerMauve/repos","events_url":"https://api.github.com/users/RangerMauve/events{/privacy}","received_events_url":"https://api.github.com/users/RangerMauve/received_events","type":"User","site_admin":false},"created_at":"2015-03-20T17:36:06Z","updated_at":"2015-03-20T17:36:06Z","body":"Any specific reason you're using [a callback](https://github.com/MrSwitch/hello.js/blob/6eeebca21eaf7f7854aeb500fadf8043d1a592d8/src/hello.js#L1696) in the parent window rather than using [postMessage](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)?\r\n\r\n"}}