{"action":"created","issue":{"url":"https://api.github.com/repos/atom/atom-shell/issues/1253","labels_url":"https://api.github.com/repos/atom/atom-shell/issues/1253/labels{/name}","comments_url":"https://api.github.com/repos/atom/atom-shell/issues/1253/comments","events_url":"https://api.github.com/repos/atom/atom-shell/issues/1253/events","html_url":"https://github.com/atom/atom-shell/issues/1253","id":62273417,"number":1253,"title":"detecting non-renderable URLs","user":{"login":"maxogden","id":39759,"avatar_url":"https://avatars.githubusercontent.com/u/39759?v=3","gravatar_id":"","url":"https://api.github.com/users/maxogden","html_url":"https://github.com/maxogden","followers_url":"https://api.github.com/users/maxogden/followers","following_url":"https://api.github.com/users/maxogden/following{/other_user}","gists_url":"https://api.github.com/users/maxogden/gists{/gist_id}","starred_url":"https://api.github.com/users/maxogden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxogden/subscriptions","organizations_url":"https://api.github.com/users/maxogden/orgs","repos_url":"https://api.github.com/users/maxogden/repos","events_url":"https://api.github.com/users/maxogden/events{/privacy}","received_events_url":"https://api.github.com/users/maxogden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-17T03:27:55Z","updated_at":"2015-03-18T20:34:10Z","closed_at":null,"body":"If I load a non-renderable URL, such as a `.zip` or something that would prompt a 'download as' prompt in a browser, atom-shell renders a blank page.\r\n\r\nThe problem I'm running in to is I am not sure how to detect that something is non-renderable.\r\n\r\nHere's a gif of what I mean:\r\n\r\n![atom-shell-load-events](https://cloud.githubusercontent.com/assets/39759/6680872/7f1e522a-cc1a-11e4-9ed5-09fdd44d4ae0.gif)\r\n\r\nHere's the source code of the test program: https://gist.github.com/maxogden/891f9f69be667e11fa5e\r\n\r\nI've noticed that the `did-stop-loading` event fires before `did-finish-load`, and in the `did-stop-loading` callback I get `false` from `WebContents.isLoading()`\r\n\r\nMy problem is that I have no way of knowing if `did-stop-loading` (correction: I mean `did-finish-load`) will ever fire, as it never fires for non-renderable content. But there doesn't seem to be a way to know if the content is non-renderable through the API."},"comment":{"url":"https://api.github.com/repos/atom/atom-shell/issues/comments/83159632","html_url":"https://github.com/atom/atom-shell/issues/1253#issuecomment-83159632","issue_url":"https://api.github.com/repos/atom/atom-shell/issues/1253","id":83159632,"user":{"login":"maxogden","id":39759,"avatar_url":"https://avatars.githubusercontent.com/u/39759?v=3","gravatar_id":"","url":"https://api.github.com/users/maxogden","html_url":"https://github.com/maxogden","followers_url":"https://api.github.com/users/maxogden/followers","following_url":"https://api.github.com/users/maxogden/following{/other_user}","gists_url":"https://api.github.com/users/maxogden/gists{/gist_id}","starred_url":"https://api.github.com/users/maxogden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxogden/subscriptions","organizations_url":"https://api.github.com/users/maxogden/orgs","repos_url":"https://api.github.com/users/maxogden/repos","events_url":"https://api.github.com/users/maxogden/events{/privacy}","received_events_url":"https://api.github.com/users/maxogden/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T20:34:10Z","updated_at":"2015-03-18T20:34:10Z","body":"Maybe chromium has some sort of event for e.g. 'render type'? For example, if I load a `.js` file I get this:\r\n\r\n![screen shot 2015-03-18 at 1 31 12 pm](https://cloud.githubusercontent.com/assets/39759/6718735/149d767e-cd73-11e4-93da-3e101cbb0da0.png)\r\n\r\nSo somewhere in chromium it knows how to display .js files (e.g. it generates an html page with a <span> etc.). Could this be surfaced through an event in atom-shell?\r\n\r\nAlso it would be *really* cool to have access to the HTTP data (especially the response data). Is this possible? Figuring out the 'render type' of a URI could probably be done pretty reliably with access to the HTTP response data because I'm guessing Chromium uses content-type as the major factor for deciding how to render something\r\n\r\n![screen shot 2015-03-18 at 1 32 46 pm](https://cloud.githubusercontent.com/assets/39759/6718765/59afef30-cd73-11e4-9182-4faf483a893d.png)\r\n"}}