Garry's Mod Wiki

Revision Difference

HTML_Web_Engine#568532

⤶ <note>This page is a work-in-progress. Additions and improvements are welcome.</note>⤶ ⤶ <title>Chromium Web Renderer</title>⤶ <title>Chromium Web Renderer</title>⤶ # Description Garry's Mod includes the Chromium Embedded Framework (CEF) web rendering engine. As of 2025 it is **CEF 86** on almost every GMod build, replacing the former **Awesomium** (Chromium 17). Garry's Mod includes the Chromium Embedded Framework (CEF) web rendering engine. As of 2025 it is **CEF 86** on almost every GMod build, replacing the former **Awesomium** (like Chromium 17). The web renderer is used by the Main Menu, <page text="Loading Screen">Loading URL</page>, and the <page>HTML</page> / <page>DHTML</page> panels. <warning>Awesomium is still used on some Linux systems. See [versions](#versions) below for details. CEF will replace this last remaining Awesomium integration in future.</warning> # Versions Since 2025, GMod is using CEF 86 on all supported platforms and <page text="branches">Dev Branch</page>, except for Linux's `main`/`dev` branches where it still uses Awesomium. Since 2025, GMod is using CEF 86 on almost all platforms and <page text="branches">Dev Branch</page>, except for Linux's `main`/`dev` branches where it still uses Awesomium. On all MacOS and some Linux systems, GMod crashes on launch. Third-party utility GModPatchTool, which updates CEF to version 137, fixes the launch crash on these platforms. ## By Platform/Branch | Platform [Branch] | Included Web Renderer | Status | | --- | --- | --- | | **Windows** (all branches) | **CEF 86** | Stable | | **Linux** [`main`/`dev`] | **Awesomium** <br/>(Chromium 17) | Crashes on load for many users but works for others. <br/> Will be replaced with CEF when Gmod's 64bit Linux builds reach dev. | | **Linux** [`x86-64`] | **CEF 86** | Crashes on load. Requires GModPatchTool to run the game, which updates it to **CEF 137**. | | **Linux** [`main`/`dev`] | **Awesomium** <br/>(like Chromium 17) | Crashes on load for many users but works for others. <br/> Will be replaced with CEF when Gmod's 64bit Linux builds reach `dev`. | | **Linux** [`x86-64`] | **CEF 80** | CEF crashes on load. GModPatchTool fixes it by updating it to **CEF 137**. | | **MacOS** (only exists in `x86-64` branch) | **CEF 80** | Crashes on load for all users. Requires GModPatchTool to run the game, which updates it to **CEF 137**. | <bug>On Linux [`x86-64`] and MacOS, CEF 80's useragent falsely claims to be `Chrome/86`. Windows is correctly CEF 86.</bug>⤶ ## By Web Engine | Web Renderer | Used by | | | --- | --- | --- | --- | | **Awesomium** (Chromium 17) | **Some Linux** users on `main`/`dev`. | _No Windows users._<br/>_No Mac users._ | | **Awesomium** (like Chromium 17) | **Some Linux** users on `main`/`dev`. | _No Windows users._<br/>_No Mac users._ | | **CEF 86** | **All Windows** users at a minimum (all branches). | _Likely no Linux users._<br/>_No Mac users._ | | **CEF 137** | **All MacOS** users need `x86-64`+GModPatchTool to run the game. <br/>**Most Linux** users, via `x86-64`+GModPatchTool. <br/>**Some Windows** users optionally use GModPatchTool, not required to run game. | - | # Web development ## Detecting browser Don't base browser support on detecting a specific Chrome version (eg 86) or branch, as this won't be accurate for some users and for future GMod updates. Check for Awesomium instead. Example: ```js var IS_AWESOMIUM = navigator.userAgent.toLowerCase().indexOf("awesomium") != -1; ``` If `IS_AWESOMIUM` is true, you can run your legacy fallback code, or show a warning message about how the user needs to be using CEF. If `IS_AWESOMIUM` is false, the user is running at least CEF 86 or any future newer version. You can safely run your more modern code or modern feature detection. ## Supported features CEF 86 is from 2020 and is much more up-to-date than Awesomium (2012), but is still outdated and missing some functionality that is considered baseline today. While developing, use sites such as [Can I Use](https://caniuse.com/) and [MDN Web Docs](https://developer.mozilla.org/search) to search for features/functions. They will list if those features are supported in Chrome 86 (for CEF) or Chrome 17 (for Awesomium), if you need to use a prefixed version or older version of the standard, if there are any bugs to be aware of, etc. ## Known issues For a full list of CEF bugs, see [GitHub](https://github.com/Facepunch/garrysmod-issues/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22Dependency%3A%20CEF%22). List of known CEF issues relevant for developers. Not listed: Bugs such as crashing at game launch, and Awesomium-only bugs. | Link | Category | Issue | |:-----|:---------|:------| | [#5644](https://github.com/Facepunch/garrysmod-issues/issues/5644) | Media | Youtube videos are unsupported | | [#3148](https://github.com/Facepunch/garrysmod-issues/issues/3148) | Media | mp4 format not supported | | [#6982](https://github.com/Facepunch/garrysmod-issues/issues/6982) | Media/JS | currentTime in a playing video is unreliable | | [#6882](https://github.com/Facepunch/garrysmod-issues/issues/6882) | Crash | Web panels can cause crash after opening repeatedly | | [#4541](https://github.com/Facepunch/garrysmod-issues/issues/4541) | Lua/JS | DHTML:IsLoading slowness causes javascript to execute prematurely | | [#6530](https://github.com/Facepunch/garrysmod-issues/issues/6530) | Input | IME is invisible | | [#6529](https://github.com/Facepunch/garrysmod-issues/issues/6529) | Input/JS | CompositionEvents don't exist for IME/Emoji | | [#5878](https://github.com/Facepunch/garrysmod-issues/issues/5878) | Input | Text Form has unexpected behavior | | [#4930](https://github.com/Facepunch/garrysmod-issues/issues/4930) | Input | CEF click events not firing in vuejs app | | [#4464](https://github.com/Facepunch/garrysmod-issues/issues/4464) | Input | Linux 64bit Letters are numbers in input boxes | | [#4414](https://github.com/Facepunch/garrysmod-issues/issues/4414) | Input | Some characters cant be typed by non-qwerty layouts in chromium panels | | [#3994](https://github.com/Facepunch/garrysmod-issues/issues/3994) | Input | Inconsistent CEF keyboard shortcut implementation on x86-64 branch | | [#3543](https://github.com/Facepunch/garrysmod-issues/issues/3543) | Input | chromium javascript sees symbol keyboard keys as 0 in onkeydown and onkeyup |