1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! Render inline or remote HTML and CSS in a Freya component using Blitz.
//!
//! ```rust,no_run
//! # use freya::prelude::*;
//! use freya_html::prelude::*;
//!
//! # fn app() -> impl IntoElement {
//! let handle = use_html(|| HtmlSource::html("<h1>Hello!</h1>"));
//! HtmlViewer::new(handle).expanded()
//! # }
//! ```
//!
//! Configure inline documents with [`HtmlContent`], including a validated
//! base URL through [`HtmlContent::with_base_url`].
//!
//! Use [`HtmlSource::url`] to load a remote page. Add local fonts with
//! [`HtmlViewer::font`]. On web, provide a font for inline documents or load one
//! through CSS `@font-face`.
//!
//! For HTTP requests outside the viewer,
//! enable Freya's `remote-asset` feature and use [`freya_components::http::fetch`]:
//!
//! ```rust,no_run
//! # async fn load() -> Result<(), Box<dyn std::error::Error>> {
//! let url = freya_components::Url::parse("https://example.com")?;
//! let bytes = freya_components::http::fetch(url).await?;
//! # Ok(())
//! # }
//! ```
pub use ResourceCache;
pub use HtmlViewer;
pub use HtmlContent;
pub use ;