File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -103,22 +103,14 @@ pub const Element = struct {
103103
104104 pub fn get_innerHTML (self : * parser.Element , state : * SessionState ) ! []const u8 {
105105 var buf = std .ArrayList (u8 ).init (state .arena );
106- defer buf .deinit ();
107-
108106 try dump .writeChildren (parser .elementToNode (self ), buf .writer ());
109- // TODO express the caller owned the slice.
110- // https://github.com/lightpanda-io/jsruntime-lib/issues/195
111- return buf .toOwnedSlice ();
107+ return buf .items ;
112108 }
113109
114110 pub fn get_outerHTML (self : * parser.Element , state : * SessionState ) ! []const u8 {
115111 var buf = std .ArrayList (u8 ).init (state .arena );
116- defer buf .deinit ();
117-
118112 try dump .writeNode (parser .elementToNode (self ), buf .writer ());
119- // TODO express the caller owned the slice.
120- // https://github.com/lightpanda-io/jsruntime-lib/issues/195
121- return buf .toOwnedSlice ();
113+ return buf .items ;
122114 }
123115
124116 pub fn set_innerHTML (self : * parser.Element , str : []const u8 ) ! void {
You can’t perform that action at this time.
0 commit comments