Skip to content
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

Allow JS state (this) inside DivElement #1995

Merged
merged 2 commits into from
May 25, 2022
Merged

Conversation

fonsp
Copy link
Owner

@fonsp fonsp commented Mar 18, 2022

@fonsp fonsp added the frontend Concerning the HTML editor label Mar 18, 2022
@github-actions
Copy link
Contributor

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="persist_js_state-inside-DivElement")
julia> using Pluto

@dralletje
Copy link
Collaborator

Smart!

@fonsp
Copy link
Owner Author

fonsp commented Mar 19, 2022

Maybe we should solve script ID before merging this..

@ghaetinger
Copy link

I've just tested this out using D3, which requires this to be persisted on updates. Here's how it works:

Using this PR:

line.jl.Pluto.jl.and.9.more.pages.-.Personal.-.Microsoft.Edge.2022-03-30.11-56-54.mp4

Without this PR:

line.jl.Pluto.jl.and.7.more.pages.-.Personal.-.Microsoft.Edge.2022-03-30.11-58-58.mp4

The animation looks really cool and it's completely removed without this 😢

@fonsp
Copy link
Owner Author

fonsp commented Apr 4, 2022

Thanks for testing!!

@fonsp fonsp merged commit e14f9f4 into main May 25, 2022
@fonsp fonsp deleted the persist_js_state-inside-DivElement branch May 25, 2022 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Concerning the HTML editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants