RadzenMediaQuery with javascript event callback for static page

Is there a way to add a javascript callback for the "change" event in the RadzenMediaQuery?

For example, in the code snippet below, can the "@OnResponsiveBreak" callback be moved from the @code section into the "script" section?

The reason is we have .net 8 static render pages, and we want to get events but it will need to be in the "script" section as @Code will not run. It could be that the IJSRuntime injection scenario doesn't work in "static" render mode, and trying to intermingle will not work, but I wanted to ask the question.

<RadzenMediaQuery Query="(max-width: 767.98px)" Change=@OnResponsiveBreak />


<script>
    How can the callback from RadzenMediaQuery be here instead?
</script>

@code {
    private void OnResponsiveBreak(bool matches)
    {
   
        StateHasChanged();
    }

   
}

thanks
Rob
Radzen Blazor Studio Professional owner

As you know Blazor events are not raised in static rendering mode. This is by design and there is no way around that except of using a different rendering mode.

If you want to run JavaScript when a media query changes you can use just JavaScript. Check the relevant JS API's.