Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13951

Eel not calling python function from js

$
0
0

Im making a toggle in my Eel app but for some reason it does not print Test to the terminal.

<div class="container-afk"><label class="toggle_box"><input type="checkbox" id="checkbox"><div class="circle"></div><h3 class="afk-text">AFK Reply</h3></label></div>``` Dont mind my trash naming lolJavascript in my index.html file
<script src="script.js"></script><script>        function AfkOn() {            console.log('Checkbox clicked');            var checkbox = document.getElementById('checkbox');            if (checkbox.checked) {                eel.AfkOn();            }        }</script>
Python

@eel.exposedef toggleAfk():print('Test')

there is no errors in the console of the app or in the terminal I cant find anything online about how to fix it. I have tried rewriting it and to no luck idk whats causing this.

Viewing all articles
Browse latest Browse all 13951

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>