This example is running in WebGL2 and should work in most browsers. You can check the WebGPU examples here.
enabling_disabling_diagnostic.rs:
//! Shows how to disable/re-enable a Diagnostic during runtime
use Duration;
use ;