JS
- Code: Select all
var A = function() {}
var a = new A();
isIntanceOf(a, A);
C++
- Code: Select all
//Only the relevant parts of code is shown here...
bool MyHandler::Execute(...)
{
if(name.compare("isInstanceOf") == 0)
{
CefRefPtr<CefV8Value> obj = arguments[0];
CefRefPtr<CefV8Value> fn = arguments[1];
bool instance = isInstanceOf(obj, fn); // How do I implement this?
retval = CefV8Value::CreateBool(instance);
return true;
}
}
Thanks in advance for your help.