tDOM is an XML parser based on expat that provides both a SAX and a DOM parser. It parses into its own DOM that one can then run XPATH expressions against or manipulate as one sees fit with tDOM's interface methods.
Unfortunately the DOM for tDOM is not the web browser DOM that Javascript interfaces with. Same term, so very confusing, but not the same DOM's.
Re:Wacl: Tcl distro customized for WebAssembly
by ecky-l on Sunday April 30, 2017 @02:30PM
(#14233083)
tDOM is just for parsing and generating XML or, more interrestingly, HTML.
Once you have that, you can use the ::wacl::dom command to inject it into the browser dom. Or use the wacl::dom command to get HTML which then can be parsed via tDOM.
How is tDOM supposed to work if WebAssembly doesn't have access to the DOM?