Introduces a new primitive used by the compiler for type checking. Type
checking applies to component parameters when setting the value directly
and when using bind. This is nice because it also adds error checking
for bind.
* Add support for invoking async JavaScript functions from .NET.
* Add support for invoking .NET methods from JavaScript.
* Add support for invoking async .NET methods from JavaScript.
This change should hopefully end the MSBuild craziness that happens when
you add a file to the project using the VS Add Item dialog.
VS apparently has a behavior that intentionally tries to make sure the
added file is only included in a single itemgroup. So when Blazor
defines an itemgroup at the top level of scope with the same members as
Content - VS does some gymnastics to prevent it working.
The workaround is to defer the initialization of our itemgroup.
* Handle links to empty-string href, resolved against base href
Needed to change the URLs used in E2E tests to be able to cover this (i.e., removed the /RouterTest prefixes so the default relative URL became an empty string)
* Change links in StandaloneApp sample to be relative
* Standardize on base URIs having trailing slash everywhere
Hence also change terminology from "base URI prefix" to simply "base URI"
* Handle link highlighting when visiting base-href-but-without-trailing-slash
* Removing leading slashes from base-relative URLs in templates
* Add support for zero copy byte array marshalling
* Add support for sending arbitrary HttpContent, refs #479
* Fix unit test to set ContentType correctly
* Add support for receiving binary data
* Compare header case insensitive
* Add unit test for binary http requests
The logic that binds event handlers was interfering with the code that
prevents component properties from receiving complex content.
This check was a little overzealous.
The problem is that the new HTML rewrite pass was traversing into
attributes of all kinds and would turn any HTML content inside those
attributes into elements where possible. The solution is to not do
that.
We weren't handling a few cases that can occur during typing correctly.
Our passes that look at the content of attributes need to be prepared
for it to be empty in cases where the attribute has been partially
typed in the editor.
I added a smoke test for this that attempts to simulate typing and found
another issue to fix.
The end result of this is that the design for this kind of code is
simpler and takes a more 'brute-force' approach to understanding
attributes. I think this is a good change based on the problems with how
this code has been written today, there are too many possible cases to
try and have the code express and document them all.
* In Blazor cshtml files, auto-import Microsoft.AspNetCore.Blazor and Microsoft.AspNetCore.Blazor.Components. Fixes#749
* Remove redundant @using directives from tests
* Update assertion in test
* Update all affected baselines
* Add camelCase utility
* Use camelCase when JSON-serializing (but not for dictionary keys)
* Make JSON deserialization treat member names case-insensitively (but retain case on dictionary keys)
* Use camelCase in JSON in the samples and templates
* Reverse the order of the params for the camelcase test because it's weird otherwise
* CR feedback
This change replaces the parsing of HTML that we perform during the code
generation phase, which parsing of HTML during the IR lowering phase.
The main benefit of this change is that the structure of the HTML is
reflected in the IR tree, allowing us to do more more advance
transformations.
As an example, see how the the handling of `<script>` tags is now a
separate pass.
As an aside from this I also redesigned the structure of component IR
nodes to match the new HTML element nodes. Passes are now more easily
aware of the nodes they are expected to handle and are more easily aware
of the difference between a component and element. This still isn't as
clean as I would like, but I think it's a reasonable improvement.
Another benefit of this is that the code generation is much simpler and
requires much less bookkeeping and statefulness.
This change adds tag helpers and defines event types for all of the DOM
events we could find. You'll find it much easier now to subcribe to
these events.
While we did define new event types, we didn't substantially expand the
set of data that we serialize for events. We're looking for feedback on
what is most critical to have, and looking for contributions adding
those data and tests.