v1.10.0
foo_ui_webview2 v1.10.0
WebView2-based UI host for foobar2000 — build the player UI with HTML/CSS/JS.
This release rounds out the self-drawn (WebView-rendered) tray/popup menu — layout modes, vertical sliders, keyboard & accessibility — plus a security hardening pass. The documentation site is now bilingual, and starting with this release every release ships an offline docs package.
Added
TrayMenuItem.orientationfortype:'slider':'horizontal'(default) or'vertical'(min at bottom / max at top, arrow + Home/End keys)TrayMenuConfig.layoutMode:'flat'(default) or'zones', wrapping non-empty top / playback / bottom sections in.fb-zone[data-zone]containers- Both new fields are ignored by
nativemenus and older runtimes; probeconfig.getVersionInfo().plugin.versionif your theme depends on them - Bilingual documentation site: English is now the default, with a complete Chinese mirror under
/zh/ - Offline documentation package (
foo_ui_webview2-docs-x.y.z.zip) attached to every release from now on
Improved
- Custom-menu keyboard model: roving-tabindex navigation plus rich-control editing, with ARIA roles (
menuitem,menuitemcheckbox, slider, segmentedradiogroup) - Entrance/exit menu animations are disabled under
prefers-reduced-motion: reduce - Themes can now lay out the menu root or zones with flex/grid: protected CSS no longer forces
display:block !importanton the visible menu (anddisplay:* !importantcan no longer reveal a hidden menu) segmentedvalue changes now keep the menu open, consistent withrating/slider; each change emitstray:menuItemClickedwith{ id, value }
Security
⚠️ New transactional resource limits ontray.setContextMenu/tray.appendMenuItems/menu.show: items ≤ 512,menu.showdepth ≤ 8, segmented options ≤ 64, CSS ≤ 256 KiB, total SVG ≤ 256 KiB. Oversized or invalid input is now rejected withINVALID_PARAMS(field/limit/actualindetails) — themes that previously passed such input must trim it- Menu SVG icons are parsed with DOMParser plus an element/attribute allowlist instead of raw
innerHTML; invalid or oversized icons are dropped while the menu keeps rendering - Built-in action routing now relies on trusted internal provenance and one-shot tokens instead of public id prefixes (sole compatibility exception:
_sys_exit); internal menu IPC verifies the calling window and current menu id
Fixed
- Fixed reserved space for unopened submenu panels showing as a blank acrylic/mica area and silently disabling the configured backdrop
- Fixed leading/trailing separators left behind when an entire menu section is hidden via
visible:false - Corrected docs for
TrayMenuItem.icon: base64 ICO is reserved and not rendered by either backend — useiconSvg
1.10.0 中文说明
基于 WebView2 的 foobar2000 界面宿主 —— 用 HTML/CSS/JS 构建播放器界面。
本版完善自绘(WebView 渲染)托盘/弹出菜单:布局模式、垂直滑块、键盘与无障碍,并完成一轮安全加固。文档站全面双语化,且从本版起每个 release 附带离线文档包。
新增功能
- 滑块菜单项新增
orientation:'horizontal'(默认)或'vertical'(min 在底/max 在顶,方向键与 Home/End 可用) - 新增
TrayMenuConfig.layoutMode:'flat'(默认)或'zones',为非空的顶部/播放/底部分区生成.fb-zone[data-zone]容器 - 两个新字段在
native菜单与旧版运行时中被忽略;依赖它们的主题请用config.getVersionInfo().plugin.version探测 - 文档站双语化:英文为默认语言,
/zh/提供完整中文镜像 - 从本版起每个 release 附带离线文档包(
foo_ui_webview2-docs-x.y.z.zip)
优化改进
- 自绘菜单键盘模型:roving-tabindex 导航 + 富控件编辑两态,配套 ARIA 角色(
menuitem、menuitemcheckbox、slider、segmentedradiogroup) - 系统开启"减弱动态效果"时禁用菜单出入场动画
- 主题可对菜单根/分区使用 flex/grid 布局:保护性 CSS 不再对可见菜单强制
display:block !important(同时display:* !important不再能显示隐藏菜单) segmented改值不再关闭菜单,与rating/slider一致;每次改值发出tray:menuItemClicked(载荷{ id, value })
安全加固
⚠️ tray.setContextMenu/tray.appendMenuItems/menu.show新增事务化资源上限:菜单项 ≤ 512、menu.show深度 ≤ 8、segmented 选项 ≤ 64、CSS ≤ 256 KiB、SVG 总量 ≤ 256 KiB。超限或非法输入现在返回INVALID_PARAMS(details含field/limit/actual)—— 以前能通过的超限菜单需要精简- 菜单 SVG 图标改用 DOMParser + 元素/属性白名单解析,替代裸
innerHTML;非法或超大图标被安全丢弃,菜单继续渲染 - 内建动作路由改用可信内部来源 + 一次性 token,不再依赖公开 id 前缀(唯一兼容例外:
_sys_exit);内部菜单 IPC 校验调用窗口与当前菜单 id
Bug 修复
- 修复为未展开子菜单预留的空间显示为空白亚克力/云母区域、并悄悄禁用所配置背景效果的问题
- 修复整段菜单项经
visible:false隐藏后残留首/尾分隔符的问题 - 更正
TrayMenuItem.icon文档:base64 ICO 为保留字段、两种后端均不渲染 —— 请使用iconSvg
📥 Installation · 安装
Download foo_ui_webview2-1.10.0.fb2k-component below (x86 + x64 bundled), double-click it (or Preferences → Components → Install…), then restart foobar2000.
下载下方 foo_ui_webview2-1.10.0.fb2k-component(含 x86/x64),双击安装(或 选项 → Components → Install…),重启 foobar2000。
SDK (npm): npm install foo-webview-sdk@1.10.0
📚 Documentation · 文档
- Online · 在线:https://nereafantasia.github.io/foo_ui_webview2/ (English · 中文)
- Offline · 离线:download
foo_ui_webview2-docs-1.10.0.zip, unzip, runopen-docs.cmd— Windows 10/11 built-in PowerShell only, no Node.js / npm / admin / Internet required
下载foo_ui_webview2-docs-1.10.0.zip解压后运行open-docs.cmd,仅需 Windows 10/11 内置 PowerShell,无需 Node.js、npm、管理员权限或联网 - README:https://github.com/NereaFantasia/foo_ui_webview2#readme