Fix linting errors and add isSupported
This commit is contained in:
parent
686b1388b1
commit
3938373ecb
6 changed files with 21 additions and 6 deletions
|
@ -132,6 +132,10 @@ void Notification::OnInitialProps() {
|
|||
}
|
||||
}
|
||||
|
||||
bool Notification::IsSupported() {
|
||||
return !!brightray::BrowserClient::Get()->GetNotificationPresenter();
|
||||
}
|
||||
|
||||
// static
|
||||
void Notification::BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::FunctionTemplate> prototype) {
|
||||
|
@ -166,6 +170,8 @@ void Initialize(v8::Local<v8::Object> exports,
|
|||
mate::Dictionary dict(isolate, exports);
|
||||
dict.Set("Notification",
|
||||
Notification::GetConstructor(isolate)->GetFunction());
|
||||
|
||||
dict.SetMethod("isSupported", &Notification::IsSupported);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue