{"action":"created","issue":{"url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/185","labels_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/185/comments","events_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/185/events","html_url":"https://github.com/bridgedotnet/Bridge/issues/185","id":69027480,"number":185,"title":"Wrong enum type for XmlHttpRequest.ReadyState","user":{"login":"Suchiman","id":7110884,"avatar_url":"https://avatars.githubusercontent.com/u/7110884?v=3","gravatar_id":"","url":"https://api.github.com/users/Suchiman","html_url":"https://github.com/Suchiman","followers_url":"https://api.github.com/users/Suchiman/followers","following_url":"https://api.github.com/users/Suchiman/following{/other_user}","gists_url":"https://api.github.com/users/Suchiman/gists{/gist_id}","starred_url":"https://api.github.com/users/Suchiman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Suchiman/subscriptions","organizations_url":"https://api.github.com/users/Suchiman/orgs","repos_url":"https://api.github.com/users/Suchiman/repos","events_url":"https://api.github.com/users/Suchiman/events{/privacy}","received_events_url":"https://api.github.com/users/Suchiman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-16T23:16:36Z","updated_at":"2015-04-16T23:53:47Z","closed_at":null,"body":"[XMLHttpRequest.cs line 23](https://github.com/bridgedotnet/Bridge/blob/b5570ec17f30a17975f04ddc7cbadc46b21812e4/Html5/Ajax/XMLHttpRequest.cs#L23) is using the type ```ReadyState``` which doesn't seems valid for XmlHttpRequest.\r\nChanging it to ```AjaxReadyState``` seems to fix it."},"comment":{"url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/comments/93864181","html_url":"https://github.com/bridgedotnet/Bridge/issues/185#issuecomment-93864181","issue_url":"https://api.github.com/repos/bridgedotnet/Bridge/issues/185","id":93864181,"user":{"login":"Suchiman","id":7110884,"avatar_url":"https://avatars.githubusercontent.com/u/7110884?v=3","gravatar_id":"","url":"https://api.github.com/users/Suchiman","html_url":"https://github.com/Suchiman","followers_url":"https://api.github.com/users/Suchiman/followers","following_url":"https://api.github.com/users/Suchiman/following{/other_user}","gists_url":"https://api.github.com/users/Suchiman/gists{/gist_id}","starred_url":"https://api.github.com/users/Suchiman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Suchiman/subscriptions","organizations_url":"https://api.github.com/users/Suchiman/orgs","repos_url":"https://api.github.com/users/Suchiman/repos","events_url":"https://api.github.com/users/Suchiman/events{/privacy}","received_events_url":"https://api.github.com/users/Suchiman/received_events","type":"User","site_admin":false},"created_at":"2015-04-16T23:53:47Z","updated_at":"2015-04-16T23:53:47Z","body":"If you have a look at [AjaxReadyState.cs](https://github.com/bridgedotnet/Bridge/blob/b5570ec17f30a17975f04ddc7cbadc46b21812e4/Html5/Ajax/AjaxReadyState.cs) you will see that this one matches the numeric values from mozillas spec.\r\n[ReadyState.cs](https://github.com/bridgedotnet/Bridge/blob/b5570ec17f30a17975f04ddc7cbadc46b21812e4/Html5/ReadyState.cs) on the other hand translates to string variables.\r\nI tested it using\r\n```csharp\r\npublic static void Main()\r\n{\r\n    XMLHttpRequest request = new XMLHttpRequest();\r\n    request.Open(\"GET\", \"http://some.tld\");\r\n    request.OnReadyStateChange = () =>\r\n    {\r\n        switch (request.ReadyState)\r\n        {\r\n            case ReadyState.Complete:\r\n                Window.Alert(\"Complete\");\r\n                break;\r\n            case ReadyState.Interactive:\r\n                Window.Alert(\"Interactive\");\r\n                break;\r\n            case ReadyState.Loading:\r\n                Window.Alert(\"Loading\");\r\n                break;\r\n            default:\r\n                Window.Alert(\"Not an expected value\");\r\n                break;\r\n        }\r\n    };\r\n    request.Send();\r\n}\r\n```\r\nresulting in\r\n```JavaScript\r\nmain: function () {\r\n    var request = new XMLHttpRequest();\r\n    request.open(\"GET\", \"http://some.tld\");\r\n    request.onreadystatechange = function () {\r\n        switch (request.readyState) {\r\n            case \"complete\": \r\n                window.alert(\"Complete\");\r\n                break;\r\n            case \"interactive\": \r\n                window.alert(\"Interactive\");\r\n                break;\r\n            case \"loading\": \r\n                window.alert(\"Loading\");\r\n                break;\r\n            default: \r\n                window.alert(\"Not an expected value\");\r\n                break;\r\n        }\r\n    };\r\n    request.send();\r\n}\r\n```\r\nwhich always ended in \"Not an expected value\" which i've verified using the browser debugging tools which also confirmed that the value is in fact numeric."}}