Commit Graph

489 Commits

Author SHA1 Message Date
Steve Sanderson a728b42181 Avoid some ws-proxy crashes 2018-07-10 10:34:06 +01:00
Steve Sanderson 4868cdbfa3 Change BrowserRendererRegistry not to be static, and to scope the BrowserRenderer IDs to each instance
This is to ensure that, in multiuser scenarios, users can't interfere with each other by posting events for somebody else's renderer ID.

TODO: Still need to wire up or replace the temporary static BrowserRendererRegistry.CurrentUserInstance property to provide per-user storage.
2018-07-10 09:56:00 +01:00
Steve Sanderson 767a2373c8 Eliminate ElementRef's static incrementing ID for remote rendering cases
... because it's important not to disclose cross-user state, such as the number of IDs that have been assigned. Plus we don't want to run out of unique IDs, which we could if it's limited by the range of an 'int'.
2018-07-10 09:52:19 +01:00
Steve Sanderson c2f3128ef9 Extremely minor cleanups 2018-07-10 09:52:19 +01:00
Ryan Nowak ee62bd8d45 Add startup for client/mono Blazor
This change adds a host builder, and the startup pattern for client-side
Blazor apps running in mono/wasm. This will help us align better with
server side Blazor.
2018-07-09 11:13:26 -07:00
Joseph Musser ed57767e6a Removed trailing space from template survey link (#1099) 2018-07-09 13:47:07 +01:00
Steve Sanderson 7bc67e1481 Simple approach for minifying blazor.*.js on release builds. Fixes #1003
Later we might want to emit both min and non-min variants of the file, when there is some way for developers to control which one they use
2018-07-09 11:04:14 +01:00
Steve Sanderson 5bccac05fc Refactoring to prepare for remote rendering.
- Prepare for building multiple entrypoint variants of the .js library
- Use async interop more consistently for rendering and event handling
- Add binary serializer for RenderBatch with tests
2018-07-09 11:04:14 +01:00
Steve Sanderson cafb56569d Initial debugger support 2018-07-06 11:56:21 +01:00
Steve Sanderson c881a63a78 Include Mono Debug proxy code in Server project (temporarily until it's shipped as a NuGet package) 2018-07-06 11:56:21 +01:00
Steve Sanderson f483e6293e Update linker config following Mono upgrade to f382b069151 2018-07-06 11:56:21 +01:00
Ryan Nowak e0168eb0c8 Implement server-side sync context
This is a synchronization context we can use for server side blazor to
support a single logical thread of execution. This is optimized for
scalability and non-blocking behavior.
2018-07-05 12:41:31 -07:00
Ryan Nowak 8724b84a14 Fix #1068
This changes the bind lowering pass to be more tolerant of unexpected
and invalid content.
2018-07-05 11:28:54 -07:00
Ryan Nowak 844e38e641 Update versions to 2.1
Updates ASP.NET package versions to 2.1

Tweaks TFMs
- libraries = netstandard2.0
- exes/apps/tools = netcoreapp2.1
- unit tests = netcoreapp2.0
- e2e tests = netcoreapp2.1 (dependency on apps)

The exception to this is the Browser.JS project which depends on our
tool for its build. however this project just builds the js code so its
TFM doesn't really matter.
2018-07-05 09:53:55 -07:00
Ryan Nowak 45544858a3 Fix #954 - use weak typing for 'event handlers'
This change introduces a mechanism for bypassing type checking and then
uses for the 'event handlers'. The event handler tag helpers have some
ideosyncratic behaviors and rely on overloading at the render tree
builder level.
2018-07-05 09:15:01 -07:00
Steve Sanderson 97d044e479 Update to Mono Linker d18d497 2018-07-05 13:13:28 +01:00
Carmelo Messina 033edeaae4 Fix for #1071 2018-07-03 09:56:01 +01:00
Steve Sanderson b869ced648 Add RenderBatch reader abstraction (#1052)
* In .JS project, make RenderBatch into an interface with SharedMemoryRenderBatch as implementation

* In SharedMemoryRenderBatch, use prototype functions instead of assigning references on each instantiation
2018-07-02 10:21:41 +01:00
Zef Ubachs 389ff14a82 - Changed targetframework of Microsoft.AspNetCore.Blazor.Server from netcoreapp2.0 to netstandard2.0. 2018-06-29 12:41:15 -07:00
Ryan Nowak baf6a21ef6 Update build tools 2018-06-29 12:40:57 -07:00
Steve Sanderson 2f548f0b27 Update BlazorLibrary template to use newer interop APIs 2018-06-26 14:00:50 +01:00
Steve Sanderson a2bade57c3 Move Mono.WebAssembly.Interop project into "src" dir to match build conventions 2018-06-26 13:16:36 +01:00
Steve Sanderson b275055835 JavaScript interop v3 (#1033)
* JavaScript interop via new IJSRuntime abstraction

* CR feedback
2018-06-25 15:14:42 +01:00
Anthony Chu dcd9cf7481 Add check for `wwwroot/` unix path separator (#1018) 2018-06-25 12:13:12 +01:00
Stefan Nikolei 61d6d71e8c Fix right mouse click on <a href> in firefox (#1010)
* Check if the left mouse is pressed

* using button instead of which
2018-06-25 12:11:15 +01:00
Steve Sanderson a1e613b717 When clicking <a> tag with no href, don't attempt navigation to "null". Fixes #943 2018-06-07 20:49:09 +01:00
Ryan Nowak 0fb47684c8 Fix #974
The root cause here was that we weren't setting the language version in
MSBuild, which is only for the command line version.

(cherry picked from commit 319e31f71a150e9b0d91e724f0e358390caec4c2)
2018-06-07 12:27:03 -07:00
Steve Sanderson 783edcbf4c Don't preventDefault on events. Fixes #803 2018-06-06 13:44:53 +01:00
Steve Sanderson 2492d00e75 Stylistic tweaks 2018-06-06 13:44:14 +01:00
Rémi BOURGAREL 3610068929 manages when users clicks on a link with the control button pushed. issue #867 2018-06-06 13:44:14 +01:00
Steve Sanderson 4427b3b773 Add more struct readonlyness hints 2018-06-06 11:49:55 +01:00
Todd Lang 1e866f7672 Refactoring SimpleJson.EatWhiteSpace
-Replacing arbitrary length IndexOf call with unrolled switch statement
-Reduces deserialization runtime on ~310KB test data from 13s to 5s.
2018-06-06 11:12:18 +01:00
Ryan Nowak c5c1b375ec Add more properties 2018-06-05 20:03:04 -07:00
Daniel Roth 13849a6739 Fix base type of UIErrorEventArgs 2018-06-05 20:03:04 -07:00
Ryan Nowak cb186f494a Add type checking for component parameters
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.
2018-06-05 19:58:50 -07:00
Javier Calvarro Nelson 5cb544ece8 Improved interoperability
* 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.
2018-06-05 16:09:59 -07:00
Suchiman a3776b2a20 Add support for binding long / float / double / decimal 2018-06-05 16:42:31 +01:00
Ryan Nowak 1724c1bcbc Fix #316
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.
2018-06-05 08:35:47 -07:00
Daniel Roth 5916d93118 Update survey links for 0.4.0 2018-06-01 09:17:12 -07:00
Ryan Nowak 5b40e3e121 Update versions to 2.1.0 (rtm) 2018-05-31 20:58:09 -07:00
Steve Sanderson 0e3b437dc1 Move <TemplateBlazorPackageVersion> prop to dependencies.props 2018-05-30 11:54:50 +01:00
Suchiman 0e5f9c2562 Use RestoreAdditionalProjectSources instead of RestoreSources
- The former is additive while the latter replaces the existing sources
2018-05-29 17:16:45 +01:00
Nikolei, Stefan 54eda39cb8 Update Anglesharp 2018-05-29 17:08:01 +01:00
Steve Sanderson 5dc5404570 Add notes on how to upgrade Mono, plus modify some files to make future
upgrades simpler
2018-05-24 15:55:01 +01:00
Steve Sanderson 353da42cce Clean up use of relative URLs. Fixes #844 and #845 (#878)
* 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
2018-05-24 09:54:43 +01:00
Steve Sanderson 7f3ba97fb7 Handle ChildContent that starts with an HTML element. Fixes #875 2018-05-23 15:57:48 +01:00
Steve Sanderson 9c567a0be4 Remove license notices from template output. Fixes #824 2018-05-23 11:12:48 +01:00
Robin Sue b5128a7efd Add support for sending and receiving arbitrary HttpContent, refs #479 (#815)
* 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
2018-05-23 10:16:27 +01:00
Ryan Nowak c6148b6fe6 Fix #784 - allow complex content for HTML
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.
2018-05-22 11:58:46 -07:00
Ryan Nowak a88b24ed76 Resolves #297
Removes the workaround for #297 and sets the langauge version to
experimental.

This will require 2.1.0-rc of Razor.
2018-05-22 11:10:15 -07:00