Skip to content

Conversation

@Conengmo
Copy link
Member

Idea split off from #1856.

For defined keyword arguments that expect a Javascript function, allow not only the new JsCode class, but also str. Adapt JsCode to allow both str and JsCode arguments for easier instantiation.

This means that users can use these keyword arguments without having to deal with JsCode. And JsCode is only necessary for undefined keyword arguments that are Javascript functions.

Upside of this is that users have less classes to worry about when using this plugin. Downside is it may be confusing that using a string doesn't work for undefined keyword arguments that are Javascript functions. But since that's a more advanced move, I hope those users can read and understand the docstring.

@Conengmo Conengmo merged commit 36f2ff6 into python-visualization:main Feb 28, 2024
@Conengmo Conengmo deleted the realtime-jscode-allow-string branch February 28, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant