Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

Parsing eel.expose calls doesn't respect the name param #69

@kpwelsh

Description

@kpwelsh

Parsing the eel.expose calls from the js files doesn't respect the name parameter. It grabs all thats inside of the call and tries to assign a lambda function to that, which results in things like:

function, 'myFunction' = lambda...

This is annoying, because it makes anything more than trivial function labels impossible to use - in typescript:

class TestClass {
    constructor () {
        eel.serverPrint('Hello from the client!')
        eel.expose(this.consolePrint, 'consolePrint')
    }

    consolePrint(s : string) {
        console.log('Message from server:' + s);
    }
}

this fails on both assigning a value to this.consolePrint and 'consolePrint.'

Ima just hack this in to a local branch. It does seem like there is a better way to do this whole part, though.

eel.init(path):
  ...
                        if ',' in expose_call:
                            expose_call = expose_call.split(',')[1]
                        expose_call = expose_call.strip().strip('\'')
  ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions