All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Porting JustHTML HTML5 Parser from Python to JavaScript Using Codex CLI and GPT-5.2

By

pbowyer

5mo ago· 8 min readenInsight

Summary

The author describes successfully porting JustHTML, a standards-compliant HTML5 parser originally written in Python, to JavaScript using Codex CLI and GPT-5.2 in just 4.5 hours. The resulting JavaScript library (simonw/justjshtml) is dependency-free, passes 9,200 tests from the html5lib-tests suite, and imitates the original Python API. The article details the technical process, challenges encountered, and impressive results achieved with AI-assisted coding tools.

Key quotes

· 5 pulled
I decided to try porting JustHTML from Python to JavaScript with the least amount of effort possible, using Codex CLI and GPT-5.2. It worked beyond my expectations.
I built simonw/justjshtml, a dependency-free HTML5 parsing library in JavaScript which passes 9,200 tests from the html5lib-tests suite and imitates the API
The entire process took me 4.5 hours, from starting with the Python code to having a working JavaScript library that passes 9,200 tests.
What surprised me most was how well GPT-5.2 understood the structure and intent of the Python code, making intelligent decisions about how to translate Python idioms to JavaScript equivalents.
This experience has convinced me that AI-assisted programming tools have reached a point where they can dramatically accelerate certain types of software development tasks.
Snippet from the RSS feed
I wrote about JustHTML yesterday—Emil Stenström’s project to build a new standards compliant HTML5 parser in pure Python code using coding agents running against the comprehensive html5lib-tests testing library. Last …

You might also wanna read