mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
dom: implement element.slot
This commit is contained in:
@@ -57,6 +57,14 @@ pub const Element = struct {
|
|||||||
return try parser.elementSetAttribute(self, "class", class);
|
return try parser.elementSetAttribute(self, "class", class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn get_slot(self: *parser.Element) ![]const u8 {
|
||||||
|
return try parser.elementGetAttribute(self, "slot") orelse "";
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_slot(self: *parser.Element, slot: []const u8) !void {
|
||||||
|
return try parser.elementSetAttribute(self, "slot", slot);
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get_attributes(self: *parser.Element) !*parser.NamedNodeMap {
|
pub fn get_attributes(self: *parser.Element) !*parser.NamedNodeMap {
|
||||||
return try parser.nodeGetAttributes(parser.elementToNode(self));
|
return try parser.nodeGetAttributes(parser.elementToNode(self));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user