cefManager 1.0.0

   (0 reviews)
Sign in to follow this  

About This File

A library to easier manage CEF windows.

Creating a CEF Window

Function is based on Promise because I need this in my own resources. Promise return a CEF window object.

cef window name (string)
url (string)
parameters to exec (array) - take a look on Executing a function into a CEF Window for parameters

cefManager.createCef(cef window name, url, parametersToExec).then(cef => {})

cefManager.createCef('hud', 'package://rage/browsers/hud/index.html').then(cef => {})

Executing a function into a CEF Window

Again function is based on Promise but returns nothing.

cef window name (string)
[function name (string), args how much you need(number, string, boolean etc.)]

cefManager.executeCef(cef window name, [function name, args]).then(() => {})

cefManager.executeCef('hud', ['console.log', mp.players.length]).then(() => {})

Checking if CEF with name exists

cef window name (string)

cefManager.existsCef(cef window name)

const exists = cefManager.existsCef('hud')

Get CEF window object

cef window name (string)

cefManager.getCef(cef window name)

const cef = cefManager.getCef('hud')

Get CEF window current URL

cef window name (string)

cefManager.getCurrentCefURL(cef window name)

const url = cefManager.getCurrentCefURL('hud')

Get CEF window URL which was set in creating CEF window

cef window name (string)

cefManager.getCefURL(cef window name)

const url = cefManager.getCefURL('hud')

Reload CEF window

Again Promise

cef window name (string)
ignore cache (boolean) - true to ignore cache (Browser::reload)

cefManager.reloadCef(cef window name, ignore cache)

cefManager.reloadCef('hud', true).then(() => {})

 

 

ps. no support from me for this library, if something works bad fix it.


What's New in Version 1.0.0   See changelog

Released

No changelog available for this version.

  • Like 1



User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest