|
| 1 | +// Copyright (C) 2023-2025 Lightpanda (Selecy SAS) |
| 2 | +// |
| 3 | +// Francis Bouvier <[email protected]> |
| 4 | +// Pierre Tachoire <[email protected]> |
| 5 | +// |
| 6 | +// This program is free software: you can redistribute it and/or modify |
| 7 | +// it under the terms of the GNU Affero General Public License as |
| 8 | +// published by the Free Software Foundation, either version 3 of the |
| 9 | +// License, or (at your option) any later version. |
| 10 | +// |
| 11 | +// This program is distributed in the hope that it will be useful, |
| 12 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | +// GNU Affero General Public License for more details. |
| 15 | +// |
| 16 | +// You should have received a copy of the GNU Affero General Public License |
| 17 | +// along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 18 | + |
| 19 | +const Env = @import("../env.zig").Env; |
| 20 | +const parser = @import("../netsurf.zig"); |
| 21 | + |
| 22 | +pub const Interfaces = .{ |
| 23 | + ResizeObserver, |
| 24 | +}; |
| 25 | + |
| 26 | +// WEB IDL https://drafts.csswg.org/resize-observer/#resize-observer-interface |
| 27 | +pub const ResizeObserver = struct { |
| 28 | + pub fn constructor(cbk: Env.Function) ResizeObserver { |
| 29 | + _ = cbk; |
| 30 | + return .{}; |
| 31 | + } |
| 32 | + |
| 33 | + pub fn _observe(self: *const ResizeObserver, element: *parser.Element, options_: ?Options) void { |
| 34 | + _ = self; |
| 35 | + _ = element; |
| 36 | + _ = options_; |
| 37 | + return; |
| 38 | + } |
| 39 | + |
| 40 | + pub fn _unobserve(self: *const ResizeObserver, element: *parser.Element) void { |
| 41 | + _ = self; |
| 42 | + _ = element; |
| 43 | + return; |
| 44 | + } |
| 45 | + |
| 46 | + // TODO |
| 47 | + pub fn _disconnect(self: *ResizeObserver) void { |
| 48 | + _ = self; |
| 49 | + } |
| 50 | +}; |
| 51 | + |
| 52 | +const Options = struct { |
| 53 | + box: []const u8, |
| 54 | +}; |
0 commit comments