mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
netsurf: add document.getElementsByName
This commit is contained in:
@@ -659,6 +659,12 @@ pub inline fn documentGetElementById(doc: *Document, id: []const u8) ?*Element {
|
|||||||
return elem;
|
return elem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub inline fn documentGetElementsByTagName(doc: *Document, tagname: []const u8) *NodeList {
|
||||||
|
var nlist: ?*NodeList = undefined;
|
||||||
|
_ = documentVtable(doc).dom_document_get_elements_by_tag_name.?(doc, stringFromData(tagname), &nlist);
|
||||||
|
return nlist.?;
|
||||||
|
}
|
||||||
|
|
||||||
pub inline fn documentCreateElement(doc: *Document, tag_name: []const u8) *Element {
|
pub inline fn documentCreateElement(doc: *Document, tag_name: []const u8) *Element {
|
||||||
var elem: ?*Element = undefined;
|
var elem: ?*Element = undefined;
|
||||||
_ = documentVtable(doc).dom_document_create_element.?(doc, stringFromData(tag_name), &elem);
|
_ = documentVtable(doc).dom_document_create_element.?(doc, stringFromData(tag_name), &elem);
|
||||||
|
|||||||
Reference in New Issue
Block a user