Native
Provides Remote Procedure Call (RPC) capabilities between the main process and the native module.
import { native } from '@mobrowser/api';
Example
import { native } from '@mobrowser/api';
import { Person } from './gen/greet';
import { GreetServiceDescriptor } from './gen/native_service';
native.registerService(GreetServiceDescriptor, {
async SayHello(person: Person) {
return { value: `Hello, ${person.name}!` }
},
})