Skip to content

Commit 9c0d26b

Browse files
committed
add note about incomplete removal
1 parent bba9c8f commit 9c0d26b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/browser/dom/element.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,10 @@ pub const Element = struct {
510510
}
511511

512512
pub fn _remove(self: *parser.Element) !void {
513+
// TODO: This hasn't been tested to make sure all references to this
514+
// node are properly updated. A lot of libdom is lazy and will look
515+
// for related elements JIT by walking the tree, but there could be
516+
// cases in libdom or the Zig WebAPI where this reference is kept
513517
const as_node: *parser.Node = @ptrCast(self);
514518
const parent = try parser.nodeParentNode(as_node) orelse return;
515519
_ = try Node._removeChild(parent, as_node);

0 commit comments

Comments
 (0)