usage sample

This commit is contained in:
Oleksandr Honcharov
2024-06-15 17:41:45 +03:00
parent 0138af71c0
commit 34dd2172c7
3 changed files with 12 additions and 7 deletions
+5 -2
View File
@@ -1,9 +1,12 @@
import { fw } from 'rage-fw-client'
fw.event.register('customClientEvent', ([greetings]) => {
fw.browser.registerBrowser(mp.browsers.new('package://cef/index.html'))
fw.event.register('customClientEvent', async ([greetings]) => {
fw.system.log.info(greetings)
fw.player.triggerBrowser('customCefEvent', ['str'])
const data = await fw.player.triggerBrowser('customCefEvent', ['str'])
fw.system.log.info(`CEF RESPONSE: ${data}`)
return 'Hola from client!'
})