コード例 #1
0
AdblockPlus::JsValuePtr AdblockPlus::ConsoleJsObject::Setup(
    AdblockPlus::JsEnginePtr jsEngine, AdblockPlus::JsValuePtr obj)
{
  obj->SetProperty("log", jsEngine->NewCallback(::LogCallback));
  obj->SetProperty("debug", jsEngine->NewCallback(::DebugCallback));
  obj->SetProperty("info", jsEngine->NewCallback(::InfoCallback));
  obj->SetProperty("warn", jsEngine->NewCallback(::WarnCallback));
  obj->SetProperty("error", jsEngine->NewCallback(::ErrorCallback));
  obj->SetProperty("trace", jsEngine->NewCallback(::TraceCallback));
  return obj;
}
コード例 #2
0
AdblockPlus::JsValuePtr AdblockPlus::WebRequestJsObject::Setup(
    AdblockPlus::JsEnginePtr jsEngine, AdblockPlus::JsValuePtr obj)
{
  obj->SetProperty("GET", jsEngine->NewCallback(::GETCallback));
  return obj;
}