dotvvm
dotvvm copied to clipboard
dot:Events control
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}"}
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}"} />
I like your idea.
<dot:Events SpaNavigationFailed="{ staticCommand: showNavigationFailed = true}"} />
@exyi any progress?