This change adds support for mapping DOM event handlers as tag helpers
that function in a bi-modal way.
This is a new first-class feature for DOM events, and replaces a few
workarounds like using `@onclick(...)` or `click=@{ ... }`. I haven't
removed those things yet, this is a first pass to get the new support
in, we'll remove those things when we're totally satisfied.
When used with a string like `<button onclick="foo" />` the result is
a simple HTML attribute .
But when used with an implicit expression like
`<button onclick="@Foo" />` or
`<button onclick="@(x => Clicked = true)" />` a C# function is bound to
the click event from the DOM.
|
||
|---|---|---|
| .. | ||
| Razor | ||
| TestFiles | ||
| BindRazorIntegrationTest.cs | ||
| ComponentDiscoveryRazorIntegrationTest.cs | ||
| ComponentRenderingRazorIntegrationTest.cs | ||
| DeclarationRazorIntegrationTest.cs | ||
| DesignTimeCodeGenerationTest.cs | ||
| DiagnosticRazorIntegrationTest.cs | ||
| DirectiveRazorIntegrationTest.cs | ||
| FilePathRazorIntegrationTest.cs | ||
| IndexHtmlWriterTest.cs | ||
| Microsoft.AspNetCore.Blazor.Build.Test.csproj | ||
| RazorBaselineIntegrationTestBase.cs | ||
| RazorIntegrationTestBase.cs | ||
| RenderingRazorIntegrationTest.cs | ||
| RuntimeCodeGenerationTest.cs | ||
| RuntimeDependenciesResolverTest.cs | ||