Files
bevy_cef/CHANGELOG.md
elm 519aa2b2bf feat: add custom CEF V8 extensions support (#17)
* feat: Register extensions in render process

- Add CefExtensions type to hold V8 extension code
- Pass extensions through BrowserProcessAppBuilder
- Register extensions in RenderProcessHandler on WebKit initialization
- Decode JSON extensions from command line switch
- Prefix extension names with "v8/" per CEF convention
- Include actual JSON in error messages for debugging

l

* feat: refactor window.cef API and register as CEF extension

* fix: remove debug print statements in render process handler

* refactor: centralize EXTENSIONS_SWITCH constant in util.rs

* fmt

* refactor: implement Default trait for CefApiHandler

* docs: add documentation for CefApiHandler and its JavaScript API functions

---------

Co-authored-by: not-elm <elmgameinfo@gmail.com>
2026-02-04 16:08:32 +09:00

41 lines
1.7 KiB
Markdown

## Unreleased
### Breaking Changes
- Support Bevy 0.18
- Update CEF version to 144.2.0+144.0.11
- Improve message loop handling
- We can now specify command-line switches when creating the `CefPlugin`.
- As a result, `CefPlugin` is no longer a unit struct.
- Demo example removed from workspace
- Changed `JsEmitEventPlugin` to use `Receive<E>` wrapper for events
- Events no longer need to implement the `Event` trait, only `DeserializeOwned + Send + Sync + 'static`
- Changed `HostEmitEvent` to `EntityEvent` with required `webview` field
- `Default` trait is no longer implemented
- Changed navigation events `RequestGoBack` and `RequestGoForward` to `EntityEvent`
- Both events now require a `webview: Entity` field
- `Default` trait is no longer implemented
- Changed DevTools events `RequestShowDevTool` and `RequestCloseDevtool` to `EntityEvent`
- Both events now require a `webview: Entity` field
- `Default` trait is no longer implemented
- Remove auto install debug tools
- Please refer to [README.md](./README.md) and install manually from now on.
### Features
- Added `PreloadScripts` component for specifying JavaScript to be executed when the page is initialized.
- Added `CefExtensions` type for registering custom JavaScript APIs via CEF's `register_extension`
- Extensions are global and load before any page scripts
- New `extensions` example demonstrating custom JS APIs
- Refactored `window.cef` API (`brp`, `emit`, `listen`) to be registered as a CEF extension during `on_web_kit_initialized`
- The API is now available earlier in the page lifecycle
### Bug Fixes
- Fixed so that the webview can detect pointers correctly even if it is not the root entity.
- Avoid a crash when updating the cursor icon
## v0.1.0
First release