mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 06:23:45 +00:00
avoid inline + don't initialize node
This commit is contained in:
@@ -1025,11 +1025,11 @@ pub fn getElementByIdFromNode(self: *Page, node: *Node, id: []const u8) ?*Elemen
|
||||
return null;
|
||||
}
|
||||
|
||||
pub inline fn registerMutationObserver(self: *Page, observer: *MutationObserver) !void {
|
||||
pub fn registerMutationObserver(self: *Page, observer: *MutationObserver) !void {
|
||||
self._mutation_observers.append(&observer.node);
|
||||
}
|
||||
|
||||
pub inline fn unregisterMutationObserver(self: *Page, observer: *MutationObserver) void {
|
||||
pub fn unregisterMutationObserver(self: *Page, observer: *MutationObserver) void {
|
||||
self._mutation_observers.remove(&observer.node);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ pub const ObserveOptions = struct {
|
||||
pub fn init(callback: js.Function, page: *Page) !*MutationObserver {
|
||||
return page._factory.create(MutationObserver{
|
||||
._callback = callback,
|
||||
.node = .{},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user