title: How can i expose class method in V8
body: <p><strong>How can i expose class method in V8 context?</strong></p>
  
  <p>I woud like to create something like following line, but it wont work do to fact that lambda with captures can not be treated as fuction pointer.</p>
  
  <pre><code>Global()-&gt;Set("foo",v8::FunctionTemplate::New([this](const v8::Arguments &amp;args) -&gt; v8::Handle&lt;v8::Value&gt;{this-&gt;foo()}; return v8::Undefined()));
  </code></pre>
  
  <p>It is not about exposing literal type as <code>struct Point {int x,y}</code> but about exposing class method, or simple callable object.</p>