mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +00:00
dom: add document.createCDATASection
This commit is contained in:
@@ -791,6 +791,9 @@ pub fn characterDataSubstringData(cdata: *CharacterData, offset: u32, count: u32
|
||||
return strToData(s.?);
|
||||
}
|
||||
|
||||
// CDATASection
|
||||
pub const CDATASection = c.dom_cdata_section;
|
||||
|
||||
// Text
|
||||
pub const Text = c.dom_text;
|
||||
|
||||
@@ -1144,6 +1147,13 @@ pub inline fn documentCreateTextNode(doc: *Document, s: []const u8) !*Text {
|
||||
return txt.?;
|
||||
}
|
||||
|
||||
pub inline fn documentCreateCDATASection(doc: *Document, s: []const u8) !*CDATASection {
|
||||
var cdata: ?*CDATASection = undefined;
|
||||
const err = documentVtable(doc).dom_document_create_cdata_section.?(doc, try strFromData(s), &cdata);
|
||||
try DOMErr(err);
|
||||
return cdata.?;
|
||||
}
|
||||
|
||||
// DocumentHTML
|
||||
pub const DocumentHTML = c.dom_html_document;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user