Question: Is it possible to update the HTML being displayed?
See original GitHub issuePlease excuse me if it’s faux pas to ask a question in issues.
The way I’m using web-view is reading a few files, building a html-table and feeding that to web-view with
let size = (900, 778);
let resizable = false;
let debug = true;
let init_cb = |_webview| {};
let frontend_cb = |_webview: &mut _, _arg: &_, _userdata: &mut _| {};
let userdata = ();
run(
"WR-stats",
Content::Html(html),
Some(size),
resizable,
debug,
init_cb,
frontend_cb,
userdata,
);
Eventually I want to listen for changes in a file, and if there are reread that file and rebuild the html. Is it possible to simply swap out the html being displayed with this new rebuilt html?
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (8 by maintainers)
Top Results From Across the Web
Browsers does not reflects updates in the code - html
I know this is a very old topic, but Firefox still fails to show code changes after refreshing a page, then viewing the...
Read more >Handling common HTML and CSS problems - MDN Web Docs
Objective: To be able to diagnose common HTML and CSS cross browser problems, and use appropriate tools and techniques to fix them.
Read more >Structural markup and right-to-left text in HTML - W3C
This article looks at ways of handling text direction for structural markup in HTML, ie. at the document level and for elements like ......
Read more >HTML pre tag - W3Schools
The <pre> tag defines preformatted text. Text in a <pre> element is displayed in a fixed-width font, and the text preserves both spaces...
Read more >Formatting Questions - Qualtrics
Normal View: This is the default mode of editing. This view does not have as many formatting options as the rich content editor,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@eedahl you can use web_view::escape to safely pass strings to JavaScript now, but it hasn’t been published to crates.io.
Using this
looks like it works fine, but I did notice that only the JS in my original HTML was being parsed for some reason. I’m not sure if that’s a side effect of this or webkit.