{"action":"created","issue":{"url":"https://api.github.com/repos/svaarala/duktape/issues/182","labels_url":"https://api.github.com/repos/svaarala/duktape/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/svaarala/duktape/issues/182/comments","events_url":"https://api.github.com/repos/svaarala/duktape/issues/182/events","html_url":"https://github.com/svaarala/duktape/issues/182","id":69877825,"number":182,"title":"`instanceof` on Proxy object doesn't work","user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/svaarala/duktape/labels/es6","name":"es6","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/svaarala/duktape/milestones/9","html_url":"https://github.com/svaarala/duktape/milestones/v1.3.0","labels_url":"https://api.github.com/repos/svaarala/duktape/milestones/9/labels","id":1037290,"number":9,"title":"v1.3.0","description":"Buffer bindings","creator":{"login":"svaarala","id":6377415,"avatar_url":"https://avatars.githubusercontent.com/u/6377415?v=3","gravatar_id":"","url":"https://api.github.com/users/svaarala","html_url":"https://github.com/svaarala","followers_url":"https://api.github.com/users/svaarala/followers","following_url":"https://api.github.com/users/svaarala/following{/other_user}","gists_url":"https://api.github.com/users/svaarala/gists{/gist_id}","starred_url":"https://api.github.com/users/svaarala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svaarala/subscriptions","organizations_url":"https://api.github.com/users/svaarala/orgs","repos_url":"https://api.github.com/users/svaarala/repos","events_url":"https://api.github.com/users/svaarala/events{/privacy}","received_events_url":"https://api.github.com/users/svaarala/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":24,"state":"open","created_at":"2015-03-24T22:16:58Z","updated_at":"2015-07-24T03:16:19Z","due_on":null,"closed_at":null},"comments":15,"created_at":"2015-04-21T15:35:29Z","updated_at":"2015-07-24T04:23:42Z","closed_at":null,"body":"My understanding of Proxy objects is that they're supposed to pass any operations without a trap through to the original object.  However, this doesn't work:\r\n\r\n```javascript\r\nvar obj = new MyObject();\r\nvar proxy = new Proxy(obj, {});\r\nprint(proxy instanceof MyObject); // false\r\n```\r\n\r\nIs this a bug, or intended?  Background: minisphere has a ByteArray object as part of its API, used for reading raw data from files and sockets and such.  Since Duktape doesn't have TypedArrays or ArrayBuffers, I'm using a Proxy object to catch array accesses so that I can redirect the values into an underlying buffer.  However, because of the above behavior, this breaks `instanceof` for ByteArray objects.\r\n\r\nRelated issue: Applying `instanceof` against the Proxy constructor results in an `unexpected type` error being thrown."},"comment":{"url":"https://api.github.com/repos/svaarala/duktape/issues/comments/124325120","html_url":"https://github.com/svaarala/duktape/issues/182#issuecomment-124325120","issue_url":"https://api.github.com/repos/svaarala/duktape/issues/182","id":124325120,"user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T04:23:42Z","updated_at":"2015-07-24T04:23:42Z","body":"Nice, thanks. :smile:  I can't wait for 1.3!"}}