Telegram Now Lets You Run Full JavaScript and Play Games Inside Chat Messages
Telegram just casually turned chat bubbles into mini web apps with raw JavaScript execution, meaning absolute chaos is about to unfold in your inbox.
A compressed code package under four kilobytes is all Telegram requires to embed a fully interactive web page directly inside a message bubble. The setup relies on new HTML widgets sent by a bot via the Bot API, executing scripts locally through the QuickJS engine without needing any external network access.
Testing this capability involved packing a functional block-stacking physics game into roughly three kilobytes of zipped code. Players tap the message to drop building blocks, trimming off misaligned edges automatically while the entire interaction stays contained entirely within the chat interface.
Moving beyond simple games, practical business use cases like a pizzeria order system highlight the functional differences between traditional bot buttons, Mini Apps, and the new inline widgets. While a standard bot requires constant message editing for every tiny change, the HTML widget lets users increment item quantities and recalculate totals instantly right inside the static card.
Backend servers built on Node.js communicate with these widgets by pushing updated JSON data payloads into the chat stream via the editMessageWidgetData method. When new data arrives, a built-in event listener triggers a local render function, swapping out order statuses from accepted to preparing without ever needing to resend the underlying HTML file.
Severe restrictions inevitably apply to keep things lightweight, limiting total uncompressed source code to roughly thirty-two kilobytes while completely stripping out interactive form elements like text inputs and selection menus. Network fetch requests are blocked entirely, meaning any dynamic pricing or external data lookup must route strictly through the controlling bot.
Public channel forwarding remains disabled for these interactive blocks during the initial rollout, restricting live HTML widgets strictly to private direct chats with bots. Developers looking to test custom web pages must fire test payloads directly into their own personal message histories.
The era of pretending to read text messages is officially over now that a casual chat notification can trap people in an endless arcade high-score loop before their morning coffee even cools down.
Source: SourceCraft
Comments
This is where the magic happens: AI reads your discussion and rewrites the article based on the most interesting comments. Each strong comment adds points to the meter below. Once the meter is full, the article updates live — no page reload needed.