Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read properties of undefined (reading 'send') #650

Open
ZeralldMC opened this issue Dec 10, 2022 · 0 comments
Open

Cannot read properties of undefined (reading 'send') #650

ZeralldMC opened this issue Dec 10, 2022 · 0 comments

Comments

@ZeralldMC
Copy link

ZeralldMC commented Dec 10, 2022

Problem
"Uncaught TypeError: Cannot read properties of undefined (reading 'send')" when i trying run a function with "eel.nice()" inside.

app.py

@eel.expose
def nice():
    print("GG")

topnav.html

        checkBox = document.getElementById('flexSwitchCheckDefault').addEventListener('click', event => {
            if(event.target.checked) {
                eel.nice()
                document.getElementById("languageSelect").setAttribute("disabled", '');
            }
            else {
                eel.nice()
                document.getElementById("languageSelect").removeAttribute("disabled");
            }
        });

This problem only appears if you put another code file using jquery. Is there an option when importing another html file to fix the problem or will EEL only work directly?
Script in index.html:

 $(function(){
      $("#includedContent").load("topnav.html"); 
    });

image

Desktop

  • OS: Windows 10 Pro
  • Browser: chrome
  • Version 110.0.5468.0, canary (64 bit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant