Infecting the web with R
seanbirchall / scrapeable Goto Github PK
View Code? Open in Web Editor NEWInfecting the web with R
License: GNU Affero General Public License v3.0
Infecting the web with R
License: GNU Affero General Public License v3.0
Infecting the web with R
See ramnathv/htmlwidgets#487 for reference and background. @jcheng5 @seanbirchall
shinylive
Since MessageChannel
replaces traditional Shiny websocket (easily tracked in browser debugging tools) in shinylive
/webR
, debugging can be a little more difficult. I discovered
options(shiny.trace = TRUE)
in the app will log to browser console which is helpfulshinylive-inject-socket.txt
around line[https://github.com/posit-dev/shinylive/blob/main/src/assets/shinylive-inject-socket.txt#L62] by adding if(event.value && event.value.data) {console.log(JSON.parse(event.value.data))}
after shinylive::export()
in shinylive-sw.js
provides the full streamshinylive
)While this helps in my local testing, I want to stress that the issue still eventually will appear if viewer is not cleared after first render. Before I was not able to get any rendered df_viewer, but it sounds like in the original issue that df_viewer would appear.
Moving lines to the end of mod_df_viewer.R
seems to partially resolve what appears to be an asynchrony issue that happens in the shinylive
context. Oddly, when I added a line before the req
(even a commented one) without changing the order of the code, then the problem also went away at least locally in a shinylive
context.
Sean, if working correctly, you should be able to remove the manually added dependencies in lines.
The shiny::req(ide$environment_selected, input$index, input$rows, input$columns)
in line leads to a null
data
message sent. Then htmlwidgets
line fails since data.deps
does not exist.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.