René's URL Explorer Experiment


Title: Commented lines of code changing eel behavior (actually) · Issue #706 · python-eel/Eel · GitHub

Open Graph Title: Commented lines of code changing eel behavior (actually) · Issue #706 · python-eel/Eel

X Title: Commented lines of code changing eel behavior (actually) · Issue #706 · python-eel/Eel

Description: Eel version 0.16.0 Describe the bug Commented lines of code changes how Eel executes under very specific circumstances involving functions generated at runtime. These functions seem to require two eel.expose calls to be exposed properly,...

Open Graph Description: Eel version 0.16.0 Describe the bug Commented lines of code changes how Eel executes under very specific circumstances involving functions generated at runtime. These functions seem to require two ...

X Description: Eel version 0.16.0 Describe the bug Commented lines of code changes how Eel executes under very specific circumstances involving functions generated at runtime. These functions seem to require two ...

Opengraph URL: https://github.com/python-eel/Eel/issues/706

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Commented lines of code changing eel behavior (actually)","articleBody":"**Eel version**\r\n0.16.0\r\n**Describe the bug**\r\nCommented lines of code changes how Eel executes under very specific circumstances involving functions generated at runtime. These functions seem to require *two* eel.expose calls to be exposed properly, but only the first needs to execute. The second can be commented.\r\n\r\nI'm not sure if the code I'm writing should work or not, but it definitely shouldn't do this.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n\r\ncreate a div like this:\r\n```html\r\n\u003cdiv class=\"div_class\" id=\"SomeDiv\">\r\n    \u003cp>SomeDiv\u003c/p>\r\n\u003c/div>\r\n```\r\nand as many more of that class as you would like\r\n\r\nDefine functions in a loop like this:\r\n```javascript\r\nfor (const div of document.getElementsByClassName(\"div_class\")){\r\n    funcName = div.id+\"Func\"\r\n    window[funcName] = () => {\r\n        console.log(\"In function\")\r\n    }\r\n    eel.expose(window[funcName], funcName)\r\n}\r\n//eel.expose(SomeDivFunc)\r\n```\r\nand call the function from Python.\r\nThis should work (it does for me).\r\n\r\nNow, remove the commented line.\r\n```javascript\r\nfor (const div of document.getElementsByClassName(\"div_class\")){\r\n    funcName = div.id+\"Func\"\r\n    window[funcName] = () => {\r\n        console.log(\"In function\")\r\n    }\r\n    eel.expose(window[funcName], funcName)\r\n}\r\n```\r\n\r\nNow, eel fails to load the function, and we get \"module 'eel' has no attribute '\\\u003cname\\>'\".\r\n\r\nNow, if we uncomment that line, and comment or remove the first eel.expose:\r\n\r\n```javascript\r\nfor (const div of document.getElementsByClassName(\"div_class\")){\r\n    funcName = div.id+\"Func\"\r\n    window[funcName] = () => {\r\n        console.log(\"In function\")\r\n    }\r\n    //eel.expose(window[funcName], funcName)\r\n}\r\neel.expose(SomeDivFunc)\r\n```\r\n\r\nThe app will execute, and the python call will not generate an error, but the function will not be executed.\r\n\r\n**Expected behavior**\r\nThe commented line should have no impact on code execution, as it is commented.\r\n\r\nAdditionally, it is strange that this functionality requires *both* of these eel.expose calls for the function to be exposed successfully. Neither expose alone works, but the second one can be commented and it will still work.\r\n\r\nIs this even supposed to work? It is a somewhat strange use-case.\r\n\r\n**System Information**\r\n - OS: Windows 11 x64\r\n - Browser: Chrome\r\n - Python Distribution: Python 3.11\r\n","author":{"url":"https://github.com/panthuncia","@type":"Person","name":"panthuncia"},"datePublished":"2023-10-11T07:03:18Z","url":"https://github.com/python-eel/Eel/issues/706"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1902026a-5dfe-f70a-05de-1e9a7cd52030
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE816:4B7A6:FAFE:154AD:6AFDD51B
html-safe-nonce61757bb19213723fc9cbe96c28a505ff85bc4851859cfcf955909302e060bf55
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODE2OjRCN0E2OkZBRkU6MTU0QUQ6NkFGREQ1MUIiLCJ2aXNpdG9yX2lkIjoiNzQ0NjQ3NjgwMDUxNjgwNTkxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac26c328b03fc9bc8b16637420db7c04156c83ac2865de422deaa18e0b24cf97a7
hovercard-subject-tagissue:1937011267
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-eel/Eel/706/issue_layout
twitter:imagehttps://opengraph.githubassets.com/23cabefaa11ddd9f407fd831ccbfceb40a21f0c0d0ebb33f1a015eda7ef0b9fe/python-eel/Eel/issues/706
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/23cabefaa11ddd9f407fd831ccbfceb40a21f0c0d0ebb33f1a015eda7ef0b9fe/python-eel/Eel/issues/706
og:image:altEel version 0.16.0 Describe the bug Commented lines of code changes how Eel executes under very specific circumstances involving functions generated at runtime. These functions seem to require two ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepanthuncia
hostnamegithub.com
expected-hostnamegithub.com
None9918bd4004419458bcd838065ac2a76b76ebd11705d73909fff5ab99e996fa23
turbo-cache-controlno-preview
go-importgithub.com/python-eel/Eel git https://github.com/python-eel/Eel.git
octolytics-dimension-user_id114726397
octolytics-dimension-user_loginpython-eel
octolytics-dimension-repository_id115559503
octolytics-dimension-repository_nwopython-eel/Eel
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id115559503
octolytics-dimension-repository_network_root_nwopython-eel/Eel
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea231c174493a6a442c0b0544475c918b30128208
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python-eel/Eel/issues/706#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-eel%2FEel%2Fissues%2F706
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-eel%2FEel%2Fissues%2F706
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-eel%2FEel
Reloadhttps://github.com/python-eel/Eel/issues/706
Reloadhttps://github.com/python-eel/Eel/issues/706
Reloadhttps://github.com/python-eel/Eel/issues/706
python-eelhttps://github.com/python-eel
Eelhttps://github.com/python-eel/Eel
Codehttps://github.com/python-eel/Eel
Issues191 (191)https://github.com/python-eel/Eel/issues
Pull requests22 (22)https://github.com/python-eel/Eel/pulls
Actionshttps://github.com/python-eel/Eel/actions
Projectshttps://github.com/python-eel/Eel/projects
Security and qualityhttps://github.com/python-eel/Eel/security
Insightshttps://github.com/python-eel/Eel/insights
https://github.com/python-eel/Eel
Commented lines of code changing eel behavior (actually)https://github.com/python-eel/Eel/issues/706#top
bughttps://github.com/python-eel/Eel/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/panthuncia
panthunciahttps://github.com/panthuncia
on Oct 11, 2023https://github.com/python-eel/Eel/issues/706#issue-1937011267
panthunciahttps://github.com/panthuncia
bughttps://github.com/python-eel/Eel/issues?q=state%3Aopen%20label%3A%22bug%22
on Oct 11, 2023https://github.com/python-eel/Eel/issues/706#event-10614060935
Sign up for freehttps://github.com/signup?return_to=https://github.com/python-eel/Eel/issues/706
Sign in to commenthttps://github.com/login?return_to=https://github.com/python-eel/Eel/issues/706
bughttps://github.com/python-eel/Eel/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.