mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +00:00
dom: add DocumentType
This commit is contained in:
@@ -720,6 +720,31 @@ pub const DocumentPosition = enum(u2) {
|
||||
implementation_specific = c.DOM_DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC,
|
||||
};
|
||||
|
||||
// DocumentType
|
||||
pub const DocumentType = c.dom_document_type;
|
||||
|
||||
fn documentTypeVtable(dt: *DocumentType) c.dom_document_type_vtable {
|
||||
return getVtable(c.dom_document_type_vtable, DocumentType, dt);
|
||||
}
|
||||
|
||||
pub inline fn documentTypeGetName(dt: *DocumentType) []const u8 {
|
||||
var s: ?*String = undefined;
|
||||
_ = documentTypeVtable(dt).dom_document_type_get_name.?(dt, &s);
|
||||
return stringToData(s.?);
|
||||
}
|
||||
|
||||
pub inline fn documentTypeGetPublicId(dt: *DocumentType) []const u8 {
|
||||
var s: ?*String = undefined;
|
||||
_ = documentTypeVtable(dt).dom_document_type_get_public_id.?(dt, &s);
|
||||
return stringToData(s.?);
|
||||
}
|
||||
|
||||
pub inline fn documentTypeGetSystemId(dt: *DocumentType) []const u8 {
|
||||
var s: ?*String = undefined;
|
||||
_ = documentTypeVtable(dt).dom_document_type_get_system_id.?(dt, &s);
|
||||
return stringToData(s.?);
|
||||
}
|
||||
|
||||
// Document
|
||||
pub const Document = c.dom_document;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user