How do I evaluate JS and return value with Elisp? #836
-
The wiki recommend this snippet to evaluate JS in Python, text = self.buffer_widget.execute_js("get_selection();") So to replicate this in elisp, I opened an (eaf-call-sync "call_function_with_args" eaf--buffer-id "execute_js" "get_selection();") And it gave me this message, So this time, I use (eaf-call-sync "call_function_with_args" eaf--buffer-id "eval_js" "get_selection();") And it gave me this, Did I do something wrong? Can you give me some guide? That would be really helpful, thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Upgrade EAF and make sure JavaScript function's name is attribue of window object. And call JS function like below:
|
Beta Was this translation helpful? Give feedback.
Upgrade EAF and make sure JavaScript function's name is attribue of window object.
And call JS function like below: