fixed self fetching for HTMLElement

This commit is contained in:
Raph
2025-05-22 02:01:11 +02:00
parent 913568aba2
commit 450e345b28

View File

@@ -115,7 +115,7 @@ pub const HTMLElement = struct {
},
pub fn get_style(e: *parser.ElementHTML, state: *SessionState) !*CSSStyleDeclaration {
const self = try state.getNodeWrapper(HTMLElement, @ptrCast(e));
const self = try state.getOrCreateNodeWrapper(HTMLElement, @ptrCast(e));
return &self.style;
}