{"action":"opened","issue":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1436","repository_url":"https://api.github.com/repos/elm-lang/elm-compiler","labels_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1436/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1436/comments","events_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1436/events","html_url":"https://github.com/elm-lang/elm-compiler/issues/1436","id":165311257,"number":1436,"title":"allow Uint8ClampedArray to cross ports","user":{"login":"maxf","id":69542,"avatar_url":"https://avatars.githubusercontent.com/u/69542?v=3","gravatar_id":"","url":"https://api.github.com/users/maxf","html_url":"https://github.com/maxf","followers_url":"https://api.github.com/users/maxf/followers","following_url":"https://api.github.com/users/maxf/following{/other_user}","gists_url":"https://api.github.com/users/maxf/gists{/gist_id}","starred_url":"https://api.github.com/users/maxf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxf/subscriptions","organizations_url":"https://api.github.com/users/maxf/orgs","repos_url":"https://api.github.com/users/maxf/repos","events_url":"https://api.github.com/users/maxf/events{/privacy}","received_events_url":"https://api.github.com/users/maxf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-13T12:44:31Z","updated_at":"2016-07-13T12:44:31Z","closed_at":null,"body":"Some JS functions return special arrays, for instance [`getImageData()`](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getImageData) returns an object containing a [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray), which stores an image's pixel values.\r\n\r\nWhen passing an `Uint8ClampedArray` through a port, it never makes it across. It should instead be passed as a `List Int`.\r\n\r\nThere is a workaround: converting to a normal array\r\n```\r\nvar realArray = Array.prototype.slice.call(uint8array);\r\napp.ports.receiveImage.send(realArray);\r\n\r\n```\r\nbut it would be nice not to have to use it.\r\n"}}
{"actor":{"display_login":"maxf"}}