diff --git a/crates/eframe/src/web/mod.rs b/crates/eframe/src/web/mod.rs index 1963795f126..e5cdab9ad7d 100644 --- a/crates/eframe/src/web/mod.rs +++ b/crates/eframe/src/web/mod.rs @@ -53,11 +53,27 @@ pub(crate) fn string_from_js_value(value: &JsValue) -> String { value.as_string().unwrap_or_else(|| format!("{value:#?}")) } -pub(crate) fn focused_element() -> Option { +/// Returns the `Element` with active focus. +/// +/// Elements can only be focused if they are: +/// - ``/`` with an `href` attribute +/// - ``/`