{"action":"created","issue":{"url":"https://api.github.com/repos/WebReflection/es-class/issues/1","labels_url":"https://api.github.com/repos/WebReflection/es-class/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/WebReflection/es-class/issues/1/comments","events_url":"https://api.github.com/repos/WebReflection/es-class/issues/1/events","html_url":"https://github.com/WebReflection/es-class/issues/1","id":56919483,"number":1,"title":"Feature request: Bound methods","user":{"login":"bjmiller","id":197747,"avatar_url":"https://avatars.githubusercontent.com/u/197747?v=3","gravatar_id":"","url":"https://api.github.com/users/bjmiller","html_url":"https://github.com/bjmiller","followers_url":"https://api.github.com/users/bjmiller/followers","following_url":"https://api.github.com/users/bjmiller/following{/other_user}","gists_url":"https://api.github.com/users/bjmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/bjmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjmiller/subscriptions","organizations_url":"https://api.github.com/users/bjmiller/orgs","repos_url":"https://api.github.com/users/bjmiller/repos","events_url":"https://api.github.com/users/bjmiller/events{/privacy}","received_events_url":"https://api.github.com/users/bjmiller/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-07T17:56:30Z","updated_at":"2015-02-07T23:51:56Z","closed_at":"2015-02-07T21:47:57Z","body":"I'd like to have an easy way to mark specific methods in a class implementation so that every reference to `this` within those methods is bound to the object's actual `this` when processed.  This can be done by wrapping with a function that uses call/apply, using Function#bind, or anything else that works.\r\n\r\nIf you're amenable to this, I can work on a PR."},"comment":{"url":"https://api.github.com/repos/WebReflection/es-class/issues/comments/73389424","html_url":"https://github.com/WebReflection/es-class/issues/1#issuecomment-73389424","issue_url":"https://api.github.com/repos/WebReflection/es-class/issues/1","id":73389424,"user":{"login":"bjmiller","id":197747,"avatar_url":"https://avatars.githubusercontent.com/u/197747?v=3","gravatar_id":"","url":"https://api.github.com/users/bjmiller","html_url":"https://github.com/bjmiller","followers_url":"https://api.github.com/users/bjmiller/followers","following_url":"https://api.github.com/users/bjmiller/following{/other_user}","gists_url":"https://api.github.com/users/bjmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/bjmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjmiller/subscriptions","organizations_url":"https://api.github.com/users/bjmiller/orgs","repos_url":"https://api.github.com/users/bjmiller/repos","events_url":"https://api.github.com/users/bjmiller/events{/privacy}","received_events_url":"https://api.github.com/users/bjmiller/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T23:51:56Z","updated_at":"2015-02-07T23:51:56Z","body":"OK.  I'll just need to keep a lightweight binding tool around.\r\n\r\nThe reason I wanted this feature is that it's common in CoffeeScript, and I wanted that available in vanilla JS, as well.  es-class gives me every other feature I wanted for object construction.  So, between that and TypeScript's support of it using arrow expressions, I'd say it's in use among a lot of transpiler-positive programmers.  As for whether ES will ever do something like that, I suspect that won't happen. The TC will likely just say \"Use Function#bind\"."}}