Add getAttributeNamespace to MutationRecord

This commit is contained in:
Karl Seguin
2026-01-09 20:25:49 +08:00
parent 127e53cf3a
commit f1b60453bd

View File

@@ -274,6 +274,13 @@ pub const MutationRecord = struct {
return self._target;
}
pub fn getAttributeNamespace(self: *const MutationRecord) ?[]const u8 {
if (self._attribute_name != null) {
return "http://www.w3.org/1999/xhtml";
}
return null;
}
pub fn getAttributeName(self: *const MutationRecord) ?[]const u8 {
return self._attribute_name;
}
@@ -310,6 +317,7 @@ pub const MutationRecord = struct {
pub const @"type" = bridge.accessor(MutationRecord.getType, null, .{});
pub const target = bridge.accessor(MutationRecord.getTarget, null, .{});
pub const attributeName = bridge.accessor(MutationRecord.getAttributeName, null, .{});
pub const attributeNamespace = bridge.accessor(MutationRecord.getAttributeNamespace, null, .{});
pub const oldValue = bridge.accessor(MutationRecord.getOldValue, null, .{});
pub const addedNodes = bridge.accessor(MutationRecord.getAddedNodes, null, .{});
pub const removedNodes = bridge.accessor(MutationRecord.getRemovedNodes, null, .{});