Implements issue 3mhyfmgy2qu2i — DOM-JS bridge: document object and element access (Phase 11, issue 2 of 8).
Summary #
- Adds
DomBridgestruct holding sharedDocumentand wrapper identity cache (NodeId->GcRef) Vm::attach_document(doc)registers thedocumentglobal with structural properties- Document properties:
documentElement,head,body,title,nodeType - Query methods:
getElementById,getElementsByTagName,getElementsByClassName,querySelector,querySelectorAll - Factory methods:
createElement,createTextNode - Element wrappers expose
tagName,nodeName,nodeType,id,className - Wrapper identity: same DOM node always returns the same JS object (
===works) - Added
NodeId::from_index()to dom crate andParser::parse_selectors()to css crate - 20 new tests covering all acceptance criteria