Skip to content

v1.10.0

Choose a tag to compare

@NereaFantasia NereaFantasia released this 16 Jul 16:53

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.orientation for type:'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 native menus and older runtimes; probe config.getVersionInfo().plugin.version if 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, segmented radiogroup)
  • 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 !important on the visible menu (and display:* !important can no longer reveal a hidden menu)
  • segmented value changes now keep the menu open, consistent with rating / slider; each change emits tray:menuItemClicked with { id, value }

Security

  • ⚠️ New transactional resource limits on tray.setContextMenu / tray.appendMenuItems / menu.show: items ≤ 512, menu.show depth ≤ 8, segmented options ≤ 64, CSS ≤ 256 KiB, total SVG ≤ 256 KiB. Oversized or invalid input is now rejected with INVALID_PARAMS (field / limit / actual in details) — 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 — use iconSvg

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 角色(menuitemmenuitemcheckbox、slider、segmented radiogroup)
  • 系统开启"减弱动态效果"时禁用菜单出入场动画
  • 主题可对菜单根/分区使用 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(detailsfield / 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 · 文档