1

With CEFPython can we create the prototype of a javascript function and build the function in python?

<button onclick="somme(b,a)">SOMME</button>
<label id='prompt'>Bonjour</label>

def somme(self,b,a):
    self.ExecuteJavascript(document.getElementById('id').innerHTML = "somme ="+b+a)
anapt
  • 17
  • 6

1 Answers1

0

Yes, you can do this using Javascript bindings, see a snippet here: https://github.com/cztomczak/cefpython/blob/master/examples/snippets/javascript_bindings.py

Read more about javascript bindings in the Tutorial document.

Czarek Tomczak
  • 20,079
  • 5
  • 49
  • 56