Beispiel #1
0
v8::Persistent<v8::FunctionTemplate> V8HTMLDivElement::GetTemplate()
{
    V8BindingPerIsolateData* data = V8BindingPerIsolateData::current();
    V8BindingPerIsolateData::TemplateMap::iterator result = data->templateMap().find(&info);
    if (result != data->templateMap().end())
        return result->second;

    v8::HandleScope handleScope;
    v8::Persistent<v8::FunctionTemplate> templ =
        ConfigureV8HTMLDivElementTemplate(GetRawTemplate());
    data->templateMap().add(&info, templ);
    return templ;
}
Beispiel #2
0
v8::Persistent<v8::FunctionTemplate> V8HTMLDivElement::GetTemplate() {
  static v8::Persistent<v8::FunctionTemplate> V8HTMLDivElement_cache_ = ConfigureV8HTMLDivElementTemplate(GetRawTemplate());
  return V8HTMLDivElement_cache_;
}