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

Commit cfdd343

Browse files
Update for #272 (#276)
* Update README.md Give example for custom function names for eel.expose
1 parent 0418fe5 commit cfdd343

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ print('Calling Javascript...')
145145
eel.my_javascript_function(1, 2, 3, 4) # This calls the Javascript function
146146
```
147147

148+
The exposed name can also be overridden by passing in a second argument. If your app minifies JavaScript during builds, this may be necessary to ensure that functions can be resolved on the Python side:
149+
150+
```javascript
151+
eel.expose(someFunction, "my_javascript_function");
152+
```
153+
148154
When passing complex objects as arguments, bear in mind that internally they are converted to JSON and sent down a websocket (a process that potentially loses information).
149155

150156
### Eello, World!

0 commit comments

Comments
 (0)