Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/browser/dom/node.zig
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub const Node = struct {
// the parent's ownerDocument.
// This process is known as adoption.
// (7.1) https://dom.spec.whatwg.org/#concept-node-insert
if (child_owner == null or (child_owner.? != self_owner.?)) {
if (child_owner == null or (self_owner != null and child_owner.? != self_owner.?)) {
const w = Walker{};
var current = child;
while (true) {
Expand Down Expand Up @@ -319,7 +319,7 @@ pub const Node = struct {
// the parent's ownerDocument.
// This process is known as adoption.
// (7.1) https://dom.spec.whatwg.org/#concept-node-insert
if (new_node_owner == null or (new_node_owner.? != self_owner.?)) {
if (new_node_owner == null or (self_owner != null and new_node_owner.? != self_owner.?)) {
const w = Walker{};
var current = new_node;
while (true) {
Expand Down