mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +00:00
dom: document.documentURI and document.URL
This commit is contained in:
@@ -794,6 +794,12 @@ pub inline fn documentGetDocumentElement(doc: *Document) *Element {
|
||||
return elem.?;
|
||||
}
|
||||
|
||||
pub inline fn documentGetDocumentURI(doc: *Document) []const u8 {
|
||||
var s: ?*String = undefined;
|
||||
_ = documentVtable(doc).dom_document_get_uri.?(doc, &s);
|
||||
return stringToData(s.?);
|
||||
}
|
||||
|
||||
pub inline fn documentCreateElement(doc: *Document, tag_name: []const u8) *Element {
|
||||
var elem: ?*Element = undefined;
|
||||
_ = documentVtable(doc).dom_document_create_element.?(doc, stringFromData(tag_name), &elem);
|
||||
|
||||
Reference in New Issue
Block a user