fix: set prototype names on gin::Constructible
classes (#39006)
* fix: set prototype names on gin::Constructible classes * test: add tests
This commit is contained in:
parent
56b5c00312
commit
c7bdd907d7
23 changed files with 71 additions and 15 deletions
|
@ -256,7 +256,7 @@ bool Notification::IsSupported() {
|
|||
|
||||
void Notification::FillObjectTemplate(v8::Isolate* isolate,
|
||||
v8::Local<v8::ObjectTemplate> templ) {
|
||||
gin::ObjectTemplateBuilder(isolate, "Notification", templ)
|
||||
gin::ObjectTemplateBuilder(isolate, GetClassName(), templ)
|
||||
.SetMethod("show", &Notification::Show)
|
||||
.SetMethod("close", &Notification::Close)
|
||||
.SetProperty("title", &Notification::GetTitle, &Notification::SetTitle)
|
||||
|
@ -282,6 +282,10 @@ void Notification::FillObjectTemplate(v8::Isolate* isolate,
|
|||
.Build();
|
||||
}
|
||||
|
||||
const char* Notification::GetTypeName() {
|
||||
return GetClassName();
|
||||
}
|
||||
|
||||
} // namespace electron::api
|
||||
|
||||
namespace {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue