OCaml HTML5 parser/serialiser based on Python's JustHTML
1(*---------------------------------------------------------------------------
2 Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved.
3 SPDX-License-Identifier: ISC
4 ---------------------------------------------------------------------------*)
5
6(** Browser-compatible test runner for html5rw regression tests.
7
8 This module provides functions to run html5lib conformance tests
9 in the browser. Test data is provided as strings and results are
10 returned as JavaScript-accessible objects.
11
12 {2 JavaScript API}
13
14 The following functions are exposed to JavaScript via the global
15 [html5rwTests] object:
16
17 - [html5rwTests.runTreeConstructionTest(filename, content)] - Run tree
18 construction tests from a .dat file content
19 - [html5rwTests.runEncodingTest(filename, content)] - Run encoding
20 detection tests from a .dat file content
21 - [html5rwTests.runAllTests(files)] - Run all tests from an array of
22 file objects with {type, filename, content}
23 - [html5rwTests.quickParseTest(html)] - Quick parse test for a single
24 HTML string
25 - [html5rwTests.version] - Version string *)