mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
dom: add document.createCDATASection
This commit is contained in:
@@ -133,6 +133,10 @@ pub const Document = struct {
|
||||
return try parser.documentCreateTextNode(self, data);
|
||||
}
|
||||
|
||||
pub fn _createCDATASection(self: *parser.Document, data: []const u8) !*parser.CDATASection {
|
||||
return try parser.documentCreateCDATASection(self, data);
|
||||
}
|
||||
|
||||
pub fn deinit(_: *parser.Document, _: std.mem.Allocator) void {}
|
||||
};
|
||||
|
||||
@@ -235,6 +239,11 @@ pub fn testExecFn(
|
||||
};
|
||||
try checkCases(js_env, &createTextNode);
|
||||
|
||||
var createCDATASection = [_]Case{
|
||||
.{ .src = "document.createCDATASection('foo')", .ex = "[object CDATASection]" },
|
||||
};
|
||||
try checkCases(js_env, &createCDATASection);
|
||||
|
||||
const tags = comptime parser.Tag.all();
|
||||
comptime var createElements: [(tags.len) * 2]Case = undefined;
|
||||
inline for (tags, 0..) |tag, i| {
|
||||
|
||||
Reference in New Issue
Block a user