mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 06:23:45 +00:00
Merge pull request #1441 from lightpanda-io/set_attribute_to_string_api
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
e2e-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
e2e-integration-test / zig build release (push) Has been cancelled
e2e-integration-test / demo-integration-scripts (push) Has been cancelled
Some checks failed
e2e-test / zig build release (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
e2e-test / cdp-and-hyperfine-bench (push) Has been cancelled
e2e-test / perf-fmt (push) Has been cancelled
e2e-test / browser fetch (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
e2e-integration-test / zig build release (push) Has been cancelled
e2e-integration-test / demo-integration-scripts (push) Has been cancelled
fix setAttribute for new toString API
This commit is contained in:
@@ -1530,12 +1530,12 @@ pub const JsApi = struct {
|
|||||||
|
|
||||||
pub const setAttribute = bridge.function(_setAttribute, .{ .dom_exception = true });
|
pub const setAttribute = bridge.function(_setAttribute, .{ .dom_exception = true });
|
||||||
fn _setAttribute(self: *Element, name: String, value: js.Value, page: *Page) !void {
|
fn _setAttribute(self: *Element, name: String, value: js.Value, page: *Page) !void {
|
||||||
return self.setAttribute(name, .wrap(try value.toString(.{ .allocator = page.call_arena })), page);
|
return self.setAttribute(name, .wrap(try value.toStringSlice()), page);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const setAttributeNS = bridge.function(_setAttributeNS, .{ .dom_exception = true });
|
pub const setAttributeNS = bridge.function(_setAttributeNS, .{ .dom_exception = true });
|
||||||
fn _setAttributeNS(self: *Element, maybe_ns: ?[]const u8, qn: []const u8, value: js.Value, page: *Page) !void {
|
fn _setAttributeNS(self: *Element, maybe_ns: ?[]const u8, qn: []const u8, value: js.Value, page: *Page) !void {
|
||||||
return self.setAttributeNS(maybe_ns, qn, .wrap(try value.toString(.{ .allocator = page.call_arena })), page);
|
return self.setAttributeNS(maybe_ns, qn, .wrap(try value.toStringSlice()), page);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const localName = bridge.accessor(Element.getLocalName, null, .{});
|
pub const localName = bridge.accessor(Element.getLocalName, null, .{});
|
||||||
|
|||||||
Reference in New Issue
Block a user