update native-mate ref

This commit is contained in:
deepak1556 2018-04-11 12:05:45 +05:30 committed by Samuel Attard
parent 6b77fa5b3b
commit bb36a26950

View file

@ -26,10 +26,11 @@ void PreventDefault(mate::Arguments* args) {
// Create a pure JavaScript Event object. // Create a pure JavaScript Event object.
v8::Local<v8::Object> CreateEventObject(v8::Isolate* isolate) { v8::Local<v8::Object> CreateEventObject(v8::Isolate* isolate) {
if (event_template.IsEmpty()) { if (event_template.IsEmpty()) {
event_template.Reset(isolate, event_template.Reset(
ObjectTemplateBuilder(isolate) isolate,
.SetMethod("preventDefault", &PreventDefault) ObjectTemplateBuilder(isolate, v8::ObjectTemplate::New(isolate))
.Build()); .SetMethod("preventDefault", &PreventDefault)
.Build());
} }
return v8::Local<v8::ObjectTemplate>::New(isolate, event_template) return v8::Local<v8::ObjectTemplate>::New(isolate, event_template)