GoSuB Browser Progress, pt20
I'm struggling with Rust again. Basically I'm trying to fill in more tests, and that seems to go well, but I'm at a point I need to start filling "template" elements. The idea of a template element is to have some html-code that is not directly part of the main DOM tree, but is contained in its own tree. This means that an element should have its own document structure. In this case, we use a lightweight structure called documentFragment, and should hold a reference to the parent DOM (I assume we can have templates within templates this way?).
However, this is all a bit tricky with Rust and the magic of borrowing, as we now have to pass references to the main document that is created by the parser.
I'm trying to figure out how to do this in the most Rust idiomatic way, but it will be a struggle for now :>
About jaytaph
Codemuser extraordinaire
Joined: | March 24, 2023 |
Following: | 2 |
Followers: | 2 |
Posts: | 52 |
Comments: | 3 |
Upvotes: | 4 |
Previous musings
- (2) December 2024
- (1) November 2024
- (1) October 2024
- (1) September 2024
- (1) July 2024
- (2) February 2024
- (3) January 2024
- (3) December 2023
- (4) November 2023
- (5) October 2023
- (10) September 2023
- (8) August 2023
- (1) June 2023
- (1) May 2023
- (4) April 2023
- (5) March 2023