Skip to content

Fix #2155 - Allow editor.process to run on behalf of users #2177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 20, 2024

Conversation

WebReflection
Copy link
Contributor

Description

This MR fixes #2155 by providing an extra argument to pyeditor.process(code, asRunButton = false) where by default, everything is the same but if asRunButton is True the process sill simulate a user click in the Run button, avoiding the need to address it via CSS or expose it directly.

Changes

  • add an extra parameter to the signature
  • directly invoke the button when such parameter is true
  • test everything works as expected

Checklist

  • All tests pass locally
  • I have updated CHANGELOG.md
  • I have created documentation for this(if applicable)

@WebReflection WebReflection requested a review from ntoll September 20, 2024 08:12
@WebReflection
Copy link
Contributor Author

This latest version has been published on npm as:

  • JS @ https://cdn.jsdelivr.net/npm/@pyscript/core@0.5.13/dist/core.js
  • CSS @ https://cdn.jsdelivr.net/npm/@pyscript/core@0.5.13/dist/core.css

@WebReflection WebReflection merged commit a6b0964 into pyscript:main Sep 20, 2024
2 checks passed
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.

script_element.process() function not working
2 participants