mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +00:00
code style
This commit is contained in:
@@ -181,17 +181,13 @@ pub const Element = struct {
|
|||||||
// https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode
|
// https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode
|
||||||
pub fn get_previousElementSibling(self: *parser.Element) !?Union {
|
pub fn get_previousElementSibling(self: *parser.Element) !?Union {
|
||||||
const res = try parser.nodePreviousElementSibling(parser.elementToNode(self));
|
const res = try parser.nodePreviousElementSibling(parser.elementToNode(self));
|
||||||
if (res == null) {
|
if (res == null) return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return try HTMLElem.toInterface(HTMLElem.Union, res.?);
|
return try HTMLElem.toInterface(HTMLElem.Union, res.?);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_nextElementSibling(self: *parser.Element) !?Union {
|
pub fn get_nextElementSibling(self: *parser.Element) !?Union {
|
||||||
const res = try parser.nodeNextElementSibling(parser.elementToNode(self));
|
const res = try parser.nodeNextElementSibling(parser.elementToNode(self));
|
||||||
if (res == null) {
|
if (res == null) return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return try HTMLElem.toInterface(HTMLElem.Union, res.?);
|
return try HTMLElem.toInterface(HTMLElem.Union, res.?);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user