Skip to content

Conversation

philippjfr
Copy link
Contributor

@philippjfr philippjfr commented Apr 26, 2022

Moves antigravity to separate module:

  • Add it to repl.html
  • Add it to repl2.html
  • Require invoking .fly() explicitly

antigravity_repl

@philippjfr
Copy link
Contributor Author

philippjfr commented Apr 26, 2022

@fpliger @pzwang I did add a <py-env> to the basic repl example (simply because the import antigravity example looks better when inlined) but maybe it's better to leave the source of that example clean. Let me know what you want me to do here.

@philippjfr philippjfr added status: ready PR that is ready for review tag: example Related to adding or improving examples labels Apr 26, 2022
Copy link
Contributor

@fpliger fpliger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is absolutely amazing! Left a minor comment that we can address later... TY! 🚀


def __init__(self, target=None, interval=10, append=True, fly=False):
target = target or sys.stdout._out
self.target = document.getElementById(target) if isinstance(target, str) else target
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use Element(target) instead and Element(target).element will give you the JS object directly

@fpliger fpliger merged commit 67bfff6 into main Apr 26, 2022
@pww217 pww217 deleted the antigravity_enhance branch May 5, 2022 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready PR that is ready for review tag: example Related to adding or improving examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants