mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
add note about incomplete removal
This commit is contained in:
@@ -510,6 +510,10 @@ pub const Element = struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn _remove(self: *parser.Element) !void {
|
pub fn _remove(self: *parser.Element) !void {
|
||||||
|
// TODO: This hasn't been tested to make sure all references to this
|
||||||
|
// node are properly updated. A lot of libdom is lazy and will look
|
||||||
|
// for related elements JIT by walking the tree, but there could be
|
||||||
|
// cases in libdom or the Zig WebAPI where this reference is kept
|
||||||
const as_node: *parser.Node = @ptrCast(self);
|
const as_node: *parser.Node = @ptrCast(self);
|
||||||
const parent = try parser.nodeParentNode(as_node) orelse return;
|
const parent = try parser.nodeParentNode(as_node) orelse return;
|
||||||
_ = try Node._removeChild(parent, as_node);
|
_ = try Node._removeChild(parent, as_node);
|
||||||
|
|||||||
Reference in New Issue
Block a user