Files
bevy_cef/assets/host_emit.html
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

23 lines
566 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Host Emit</title>
</head>
<body style="color: white">
<h1>HTML Path: assets/host_emit.html</h1>
<p>
This example demonstrates how to receive events from the application.
</p>
<p>
The application emits a count value every second, which is then displayed in the HTML.
</p>
<h1 id="count" style="color: aqua">0</h1>
<script>
const count = document.getElementById("count");
cef.listen("count", (payload) => {
count.innerText = payload;
})
</script>
</body>
</html>