dotvvm icon indicating copy to clipboard operation
dotvvm copied to clipboard

dot:Events control

Open martindybal opened this issue 2 years ago • 3 comments

Occasionally I need to respond to a DotVVM event. https://www.dotvvm.com/docs/4.0/pages/concepts/client-side-development/dotvvm-javascript-events. I would like to have that option directly from dothtml.

My suggestion is to add a dot:Event control

<dot:event Name="SpaNavigationFailed" Command="{ staticCommand: showNavigationFailed = true}"}

martindybal avatar Jan 09 '23 17:01 martindybal

This is a good idea, IMHO.

It's not entirely trivial, we'll need to add a knockout handler to register and unregister those events to correctly handle usage in client-side Repeater (otherwise, the control is unusable in markup controls)

I'd prefer the following syntax for brevity and easier type checking.

<dot:Events SpaNavigationFailed="{ staticCommand: showNavigationFailed = true}"} />

exyi avatar Jan 09 '23 20:01 exyi

I like your idea.

<dot:Events SpaNavigationFailed="{ staticCommand: showNavigationFailed = true}"} />

martindybal avatar Jan 09 '23 20:01 martindybal

@exyi any progress?

martindybal avatar Mar 09 '23 16:03 martindybal