Chrome 157 Ships On-Device Language Detection for Android
By @sharedot · · 7 pages
- Programming
- Chrome
- Css
- Web Platform
- Android
Google released Chrome 157 stable, bringing an on-device Language Detector API to Android plus new CSS corner and text-overflow powers.
What shipped in Chrome 157
Google has released the stable version of Chrome 157, and the headline change for developers is on Android: the Language Detector API is now available, letting JavaScript pass in a string and get back the language it is written in.
Per the release notes, detection runs on the browser's built-in machine learning model installed on the device, so input text never leaves the phone.
The release also brings a batch of CSS additions — a new `corner` property, custom `text-overflow` strings, and `text-decoration-inset` — alongside 213 security bug fixes.
Why on-device detection matters
The surprising part is the architecture: because inference happens on a model installed locally, detection works even offline — GIGAZINE notes it can run without an internet connection if the required model is on the device — and offers a privacy advantage since nothing is sent to an external server.
BigGo Finance argues the on-device design also cuts network traffic, improves response speed, and makes the feature easier to adopt for business use involving highly confidential text.
Envisioned use cases include automatically identifying the language of user-entered text and prompting a translation suggestion.
The CSS haul: corners, ellipses, underlines
A new `corner` property merges what previously required separate `border-radius` and `corner-shape` declarations, with per-corner variants like `corner-top-left` and writing-direction variants like `corner-block-start`.
The `text-overflow` property now accepts arbitrary strings, so truncated text can end in `(continued)` instead of an ellipsis.
GIGAZINE also highlights `text-decoration-inset`, which adjusts the length of underlines, overlines, and strikethroughs — even with different values at the start and end — plus support for `anchor-valid` and `anchor-visible` in `position-visibility`.
Security and platform changes underneath
Security got real attention: the HTML Sanitizer API gained a `javascriptURLs` option giving developers control over how JavaScript URLs are sanitized, and the Background Fetch API is now subject to CORS restrictions — BigGo Finance reports this applies the same policy as the regular Fetch API to prevent circumventing CORS or local-network access limits.
Elsewhere, ProgressEvent is available in Service Workers, BluetoothRemoteGATTServer now inherits from EventTarget enabling addEventListener(), WebGPU supports `atomic-vec2u-min-max` for 64-bit atomic min/max, and HTML-in-canvas allows drawing HTML within canvas with DOM synchronization.
Stakes and what comes next
BigGo Finance frames the CSS expansions as code reduction and design flexibility for front-end work — simpler corner specification and customizable ellipses ease fine-grained UI implementations — while cautioning that cross-browser support varies, so real-world deployment will likely need phased rollouts and fallbacks.
The release notes list two origin trials: Connection Allowlists - Embedded Enforcement and Overscroll Areas.