예를들어, JS에는 없는 Print라는 함수를 엔진에 추가해놓고 JS에서 Print()를 호출하면 정상 동작하게 만들 수 있다.

// 자바스크립트에서 'print' 함수가 호출될 때마다, v8엔진에 의해 콜백이 호출됩니다.
// C++로 구현된 V8엔진에 Print라는 함수를 추가했고, JS에서 가져다 썼다.
void Print(const v8::FunctionCallbackInfo<v8::Value>& args) {
  bool first = true;
  for (int i=0; i<args.length(); i++) {
    v8::HandleScope handle_scope(args.GetIsolate());
    if (first) {
      first = false;
    } else {
      print(" ");
    }
    v8::String::Utf8Value str(args.GetIsolate(), args[i]);
    const char* cstr = ToCString(str);
    printf("%s", cstr);
  }
  printf("\\n");
  fflush(stdout);
}