File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1717// along with this program. If not, see <https://www.gnu.org/licenses/>.
1818
1919const std = @import ("std" );
20+ const Env = @import ("../env.zig" ).Env ;
21+
22+ const PerformanceEntry = @import ("performance.zig" ).PerformanceEntry ;
2023
2124// https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver
2225pub const PerformanceObserver = struct {
2326 pub const _supportedEntryTypes = [0 ][]const u8 {};
27+
28+ pub fn constructor (cbk : Env.Function ) PerformanceObserver {
29+ _ = cbk ;
30+ return .{};
31+ }
32+
33+ pub fn _observe (self : * const PerformanceObserver , options_ : ? Options ) void {
34+ _ = self ;
35+ _ = options_ ;
36+ return ;
37+ }
38+
39+ pub fn _disconnect (self : * PerformanceObserver ) void {
40+ _ = self ;
41+ }
42+
43+ pub fn _takeRecords (_ : * const PerformanceObserver ) []PerformanceEntry {
44+ return &[_ ]PerformanceEntry {};
45+ }
46+ };
47+
48+ const Options = struct {
49+ buffered : ? bool = null ,
50+ durationThreshold : ? f64 = null ,
51+ entryTypes : ? []const []const u8 = null ,
52+ type : ? []const u8 = null ,
2453};
2554
2655const testing = @import ("../../testing.zig" );
You can’t perform that action at this time.
0 commit comments