micaww / altv-rpc

A universal, asynchronous RPC implementation for alt:V
18 stars 10 forks source link

callServer does not work on webview #13

Closed uncle-ara closed 2 years ago

uncle-ara commented 2 years ago

Greetings. Tell me please.

Webview (cef) rpc.callServer('TEST', 13).then((response) => { console.log('=> SUCCESS: ', response) })

Server side rpc.register('TEST', (num: number) => num + 2)

In the console outputs => SUCCESS: undefined RPC can't send data from webview to the server?