-
-
-
-
-
diff --git a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/CustomPackagedApp.sln b/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/CustomPackagedApp.sln
deleted file mode 100644
index 2bfa3a42f..000000000
--- a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/CustomPackagedApp.sln
+++ /dev/null
@@ -1,50 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.0.31713.378
-MinimumVisualStudioVersion = 16.0.0.0
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomPackagedApp.Server", "Server\CustomPackagedApp.Server.csproj", "{2BFE414B-090D-4D15-9796-5AF9E4E687D2}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomPackagedApp.Client", "Client\CustomPackagedApp.Client.csproj", "{DDFCBC06-F6C5-4BC8-B202-F0FE0E1BCC2A}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {2BFE414B-090D-4D15-9796-5AF9E4E687D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2BFE414B-090D-4D15-9796-5AF9E4E687D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2BFE414B-090D-4D15-9796-5AF9E4E687D2}.Debug|x64.ActiveCfg = Debug|Any CPU
- {2BFE414B-090D-4D15-9796-5AF9E4E687D2}.Debug|x64.Build.0 = Debug|Any CPU
- {2BFE414B-090D-4D15-9796-5AF9E4E687D2}.Debug|x86.ActiveCfg = Debug|Any CPU
- {2BFE414B-090D-4D15-9796-5AF9E4E687D2}.Debug|x86.Build.0 = Debug|Any CPU
- {2BFE414B-090D-4D15-9796-5AF9E4E687D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2BFE414B-090D-4D15-9796-5AF9E4E687D2}.Release|Any CPU.Build.0 = Release|Any CPU
- {2BFE414B-090D-4D15-9796-5AF9E4E687D2}.Release|x64.ActiveCfg = Release|Any CPU
- {2BFE414B-090D-4D15-9796-5AF9E4E687D2}.Release|x64.Build.0 = Release|Any CPU
- {2BFE414B-090D-4D15-9796-5AF9E4E687D2}.Release|x86.ActiveCfg = Release|Any CPU
- {2BFE414B-090D-4D15-9796-5AF9E4E687D2}.Release|x86.Build.0 = Release|Any CPU
- {DDFCBC06-F6C5-4BC8-B202-F0FE0E1BCC2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DDFCBC06-F6C5-4BC8-B202-F0FE0E1BCC2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DDFCBC06-F6C5-4BC8-B202-F0FE0E1BCC2A}.Debug|x64.ActiveCfg = Debug|Any CPU
- {DDFCBC06-F6C5-4BC8-B202-F0FE0E1BCC2A}.Debug|x64.Build.0 = Debug|Any CPU
- {DDFCBC06-F6C5-4BC8-B202-F0FE0E1BCC2A}.Debug|x86.ActiveCfg = Debug|Any CPU
- {DDFCBC06-F6C5-4BC8-B202-F0FE0E1BCC2A}.Debug|x86.Build.0 = Debug|Any CPU
- {DDFCBC06-F6C5-4BC8-B202-F0FE0E1BCC2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DDFCBC06-F6C5-4BC8-B202-F0FE0E1BCC2A}.Release|Any CPU.Build.0 = Release|Any CPU
- {DDFCBC06-F6C5-4BC8-B202-F0FE0E1BCC2A}.Release|x64.ActiveCfg = Release|Any CPU
- {DDFCBC06-F6C5-4BC8-B202-F0FE0E1BCC2A}.Release|x64.Build.0 = Release|Any CPU
- {DDFCBC06-F6C5-4BC8-B202-F0FE0E1BCC2A}.Release|x86.ActiveCfg = Release|Any CPU
- {DDFCBC06-F6C5-4BC8-B202-F0FE0E1BCC2A}.Release|x86.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {E182336C-CE38-4CFA-BB2F-BC1B18DAA355}
- EndGlobalSection
-EndGlobal
diff --git a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/CustomPackagedApp.Server.csproj b/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/CustomPackagedApp.Server.csproj
deleted file mode 100644
index 20492526b..000000000
--- a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/CustomPackagedApp.Server.csproj
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- net6.0
- enable
- enable
-
- $(RestoreAdditionalProjectSources);
- $(MSBuildThisFileDirectory)../../.local
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/Pages/Error.cshtml b/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/Pages/Error.cshtml
deleted file mode 100644
index cf9499dda..000000000
--- a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/Pages/Error.cshtml
+++ /dev/null
@@ -1,42 +0,0 @@
-@page
-@model CustomPackagedApp.Server.Pages.ErrorModel
-
-
-
-
-
-
-
- Error
-
-
-
-
-
-
-
-
Error.
-
An error occurred while processing your request.
-
- @if (Model.ShowRequestId)
- {
-
- Request ID:@Model.RequestId
-
- }
-
-
Development Mode
-
- Swapping to the Development environment displays detailed information about the error that occurred.
-
-
- The Development environment shouldn't be enabled for deployed applications.
- It can result in displaying sensitive information from exceptions to end users.
- For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
- and restarting the app.
-
-
-
-
-
-
diff --git a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/Pages/Error.cshtml.cs b/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/Pages/Error.cshtml.cs
deleted file mode 100644
index e83858219..000000000
--- a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/Pages/Error.cshtml.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System.Diagnostics;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.Mvc.RazorPages;
-
-namespace CustomPackagedApp.Server.Pages;
-
-[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
-[IgnoreAntiforgeryToken]
-public class ErrorModel : PageModel
-{
- public string? RequestId { get; set; }
-
- public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
-
- private readonly ILogger _logger;
-
- public ErrorModel(ILogger logger)
- {
- _logger = logger;
- }
-
- public void OnGet()
- {
- RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
- }
-}
diff --git a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/Program.cs b/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/Program.cs
deleted file mode 100644
index 52dfb65d3..000000000
--- a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/Program.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-var builder = WebApplication.CreateBuilder(args);
-
-// Add services to the container.
-
-builder.Services.AddControllersWithViews();
-builder.Services.AddRazorPages();
-
-var app = builder.Build();
-
-// Configure the HTTP request pipeline.
-if (app.Environment.IsDevelopment())
-{
- app.UseWebAssemblyDebugging();
-}
-else
-{
- app.UseExceptionHandler("/Error");
- // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
- app.UseHsts();
-}
-
-app.UseHttpsRedirection();
-
-app.UseBlazorFrameworkFiles();
-app.UseStaticFiles();
-
-app.UseRouting();
-
-app.MapRazorPages();
-app.MapControllers();
-
-app.MapGet("app.bundle", (HttpContext context) =>
-{
- string? contentEncoding = null;
- var contentType = "multipart/form-data; boundary=\"--0a7e8441d64b4bf89086b85e59523b7d\"";
- var fileName = "app.bundle";
-
- var acceptEncodings = context.Request.Headers.AcceptEncoding;
- if (StringWithQualityHeaderValue.TryParseList(acceptEncodings, out var encodings))
- {
- if (encodings.Any(e => e.Value == "br"))
- {
- contentEncoding = "br";
- fileName += ".br";
- }
- else if (encodings.Any(e => e.Value == "gzip"))
- {
- contentEncoding = "gzip";
- fileName += ".gz";
- }
- }
-
- if (contentEncoding != null)
- {
- context.Response.Headers.ContentEncoding = contentEncoding;
- }
- return Results.File(
- app.Environment.WebRootFileProvider.GetFileInfo(fileName).CreateReadStream(),
- contentType);
-});
-
-app.MapFallbackToFile("index.html");
-
-app.Run();
diff --git a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/appsettings.Development.json b/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/appsettings.Development.json
deleted file mode 100644
index 0c208ae91..000000000
--- a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/appsettings.Development.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft.AspNetCore": "Warning"
- }
- }
-}
diff --git a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/appsettings.json b/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/appsettings.json
deleted file mode 100644
index 10f68b8c8..000000000
--- a/src/BlazorWebAssemblyCustomInitialization/sample/CustomPackagedApp/Server/appsettings.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft.AspNetCore": "Warning"
- }
- },
- "AllowedHosts": "*"
-}
diff --git a/src/Components.Web.Extensions/HeadManagement/HeadManagementJSObjectReference.cs b/src/Components.Web.Extensions/HeadManagement/HeadManagementJSObjectReference.cs
deleted file mode 100644
index 526f3a756..000000000
--- a/src/Components.Web.Extensions/HeadManagement/HeadManagementJSObjectReference.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Threading.Tasks;
-using Microsoft.JSInterop;
-
-namespace Microsoft.AspNetCore.Components.Web.Extensions.Head
-{
- internal class HeadManagementJSObjectReference
- {
- private const string ScriptPath = "./_content/Microsoft.AspNetCore.Components.Web.Extensions/headManager.js";
- private readonly IJSRuntime _jsRuntime;
- private Task? _headManager;
-
- public HeadManagementJSObjectReference(IJSRuntime jsRuntime)
- {
- _jsRuntime = jsRuntime;
- }
-
- public Task HeadManager =>
- _headManager ??= _jsRuntime.InvokeAsync("import", ScriptPath).AsTask();
-
- public async ValueTask SetTitleAsync(string title)
- {
- var headManager = await HeadManager;
- await headManager.InvokeVoidAsync("setTitle", title);
- }
-
- public async ValueTask AddOrUpdateHeadTagAsync(TagElement tag, string id)
- {
- var headManager = await HeadManager;
- await headManager.InvokeVoidAsync("addOrUpdateHeadTag", tag, id);
- }
-
- public async ValueTask RemoveHeadTagAsync(string id)
- {
- var headManager = await HeadManager;
- await headManager.InvokeVoidAsync("removeHeadTag", id);
- }
- }
-}
diff --git a/src/Components.Web.Extensions/HeadManagement/HeadTagBase.cs b/src/Components.Web.Extensions/HeadManagement/HeadTagBase.cs
deleted file mode 100644
index 79bac9aae..000000000
--- a/src/Components.Web.Extensions/HeadManagement/HeadTagBase.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Collections.Generic;
-using System.Text.Json;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components.Rendering;
-using Microsoft.JSInterop;
-
-namespace Microsoft.AspNetCore.Components.Web.Extensions.Head
-{
- ///
- /// Serves as a base for components that represent tags in the HTML head.
- ///
- public abstract class HeadTagBase : ComponentBase, IAsyncDisposable
- {
- private readonly string _id = Guid.NewGuid().ToString("N");
-
- private TagElement _tagElement;
- private HeadManagementJSObjectReference _jsObject = default!;
- private bool _hasRendered;
-
- [Inject]
- private IJSRuntime JSRuntime { get; set; } = default!;
-
- ///
- /// Gets or sets a collection of additional attributes that will be applied to the meta element.
- ///
- [Parameter(CaptureUnmatchedValues = true)]
- public IReadOnlyDictionary? Attributes { get; set; }
-
- ///
- /// Gets the name of the tag being represented.
- ///
- protected abstract string TagName { get; }
-
- ///
- protected override void OnParametersSet()
- {
- _tagElement = new TagElement(TagName, Attributes);
- _jsObject = new HeadManagementJSObjectReference(JSRuntime);
- }
-
- ///
- protected override async Task OnAfterRenderAsync(bool firstRender)
- {
- _hasRendered = true;
-
- await _jsObject.AddOrUpdateHeadTagAsync(_tagElement, _id);
- }
-
- ///
- protected override void BuildRenderTree(RenderTreeBuilder builder)
- {
- builder.AddMarkupContent(0, $"");
- }
-
- ///
- public async ValueTask DisposeAsync()
- {
- if (_hasRendered)
- {
- await _jsObject.RemoveHeadTagAsync(_id);
- }
- }
- }
-}
diff --git a/src/Components.Web.Extensions/HeadManagement/JsonSerializerOptionsProvider.cs b/src/Components.Web.Extensions/HeadManagement/JsonSerializerOptionsProvider.cs
deleted file mode 100644
index 72c9cc873..000000000
--- a/src/Components.Web.Extensions/HeadManagement/JsonSerializerOptionsProvider.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Text.Json;
-
-namespace Microsoft.AspNetCore.Components
-{
- internal static class JsonSerializerOptionsProvider
- {
- public static readonly JsonSerializerOptions Options = new JsonSerializerOptions(JsonSerializerDefaults.Web);
- }
-}
\ No newline at end of file
diff --git a/src/Components.Web.Extensions/HeadManagement/Link.cs b/src/Components.Web.Extensions/HeadManagement/Link.cs
deleted file mode 100644
index 83cc193b7..000000000
--- a/src/Components.Web.Extensions/HeadManagement/Link.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace Microsoft.AspNetCore.Components.Web.Extensions.Head
-{
- ///
- /// A component that adds a link tag to the HTML head.
- ///
- public sealed class Link : HeadTagBase
- {
- ///
- protected override string TagName => "link";
- }
-}
diff --git a/src/Components.Web.Extensions/HeadManagement/Meta.cs b/src/Components.Web.Extensions/HeadManagement/Meta.cs
deleted file mode 100644
index e5100bbd4..000000000
--- a/src/Components.Web.Extensions/HeadManagement/Meta.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace Microsoft.AspNetCore.Components.Web.Extensions.Head
-{
- ///
- /// A component that adds a meta tag to the HTML head.
- ///
- public sealed class Meta : HeadTagBase
- {
- ///
- protected override string TagName => "meta";
- }
-}
diff --git a/src/Components.Web.Extensions/HeadManagement/TagElement.cs b/src/Components.Web.Extensions/HeadManagement/TagElement.cs
deleted file mode 100644
index 3488eb1e1..000000000
--- a/src/Components.Web.Extensions/HeadManagement/TagElement.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Collections.Generic;
-
-namespace Microsoft.AspNetCore.Components.Web.Extensions.Head
-{
- internal readonly struct TagElement
- {
- public string Type => "tag";
-
- public string TagName { get; }
-
- public IReadOnlyDictionary? Attributes { get; }
-
- public TagElement(string tagName, IReadOnlyDictionary? attributes)
- {
- TagName = tagName;
- Attributes = attributes;
- }
- }
-}
diff --git a/src/Components.Web.Extensions/HeadManagement/Title.cs b/src/Components.Web.Extensions/HeadManagement/Title.cs
deleted file mode 100644
index 8ceb7b302..000000000
--- a/src/Components.Web.Extensions/HeadManagement/Title.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System.Text.Json;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Components.Rendering;
-using Microsoft.JSInterop;
-
-namespace Microsoft.AspNetCore.Components.Web.Extensions.Head
-{
- ///
- /// A component that changes the title of the document.
- ///
- public sealed class Title : ComponentBase
- {
- private HeadManagementJSObjectReference _jsObject = default!;
-
- [Inject]
- private IJSRuntime JSRuntime { get; set; } = default!;
-
- ///
- /// Gets or sets the value to use as the document's title.
- ///
- [Parameter]
- public string Value { get; set; } = string.Empty;
-
- protected override void OnParametersSet()
- {
- _jsObject = new HeadManagementJSObjectReference(JSRuntime);
- }
-
- ///
- protected override async Task OnAfterRenderAsync(bool firstRender)
- {
- await _jsObject.SetTitleAsync(Value);
- }
-
- ///
- protected override void BuildRenderTree(RenderTreeBuilder builder)
- {
- builder.AddMarkupContent(0, $"");
- }
- }
-}
diff --git a/src/Components.Web.Extensions/HeadManagement/TitleElement.cs b/src/Components.Web.Extensions/HeadManagement/TitleElement.cs
deleted file mode 100644
index c56d550ac..000000000
--- a/src/Components.Web.Extensions/HeadManagement/TitleElement.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-namespace Microsoft.AspNetCore.Components.Web.Extensions.Head
-{
- internal readonly struct TitleElement
- {
- public string Type => "title";
-
- public string Title { get; }
-
- public TitleElement(string title)
- {
- Title = title;
- }
- }
-}
diff --git a/src/Components.Web.Extensions/Microsoft.AspNetCore.Components.Web.Extensions.csproj b/src/Components.Web.Extensions/Microsoft.AspNetCore.Components.Web.Extensions.csproj
deleted file mode 100644
index 1348bcbd9..000000000
--- a/src/Components.Web.Extensions/Microsoft.AspNetCore.Components.Web.Extensions.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- net5.0
- A collection of Blazor components for the web.
- true
- Microsoft.AspNetCore.Components
- enable
- true
- true
- 5
- 0
- preview9
-
-
-
-
-
-
-
-
diff --git a/src/Components.Web.Extensions/Properties/AssemblyInfo.cs b/src/Components.Web.Extensions/Properties/AssemblyInfo.cs
deleted file mode 100644
index 2e06371bc..000000000
--- a/src/Components.Web.Extensions/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,3 +0,0 @@
-using System.Runtime.CompilerServices;
-
-[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Components.Web.Extensions.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")]
diff --git a/src/Components.Web.Extensions/wwwroot/headManager.js b/src/Components.Web.Extensions/wwwroot/headManager.js
deleted file mode 100644
index e6dd7f20f..000000000
--- a/src/Components.Web.Extensions/wwwroot/headManager.js
+++ /dev/null
@@ -1,96 +0,0 @@
-// Local helpers
-
-const blazorIdAttributeName = '_blazor_id';
-const headCommentRegularExpression = /\W*Head:[^{]*(.*)$/;
-const prerenderedTags = [];
-
-function createHeadTag({ tagName, attributes }, id) {
- const tagElement = document.createElement(tagName);
-
- // The id is undefined during prerendering
- if (id) {
- tagElement.setAttribute(blazorIdAttributeName, id);
- }
-
- if (attributes) {
- Object.keys(attributes).forEach(key => {
- tagElement.setAttribute(key, attributes[key]);
- });
- }
-
- document.head.appendChild(tagElement);
-
- return tagElement;
-}
-
-function resolvePrerenderedHeadComponents(node) {
- node.childNodes.forEach((childNode) => {
- const headElement = parseHeadComment(childNode);
-
- if (headElement) {
- applyPrerenderedHeadComponent(headElement);
- } else {
- resolvePrerenderedHeadComponents(childNode);
- }
- });
-}
-
-function applyPrerenderedHeadComponent(headElement) {
- switch (headElement.type) {
- case 'title':
- setTitle(headElement.title);
- break;
- case 'tag':
- const tag = createHeadTag(headElement);
- prerenderedTags.push(tag);
- break;
- default:
- throw new Error(`Invalid head element type '${headElement.type}'.`);
- }
-}
-
-function parseHeadComment(node) {
- if (!node || node.nodeType != Node.COMMENT_NODE) {
- return;
- }
-
- const commentText = node.textContent;
-
- if (!commentText) {
- return;
- }
-
- const definition = headCommentRegularExpression.exec(commentText);
- const json = definition && definition[1];
-
- return json && JSON.parse(json);
-}
-
-function removePrerenderedHeadTags() {
- prerenderedTags.forEach((tag) => {
- tag.remove();
- });
-
- prerenderedTags.length = 0;
-}
-
-// Exported functions
-
-export function setTitle(title) {
- document.title = title;
-}
-
-export function addOrUpdateHeadTag(tag, id) {
- removePrerenderedHeadTags();
- removeHeadTag(id);
- createHeadTag(tag, id);
-}
-
-export function removeHeadTag(id) {
- let tag = document.head.querySelector(`[${blazorIdAttributeName}='${id}']`);
- tag && tag.remove();
-}
-
-(function () {
- resolvePrerenderedHeadComponents(document);
-})();
diff --git a/src/DynamicJS/DynamicJS.sln b/src/DynamicJS/DynamicJS.sln
deleted file mode 100644
index 1d36bd2ad..000000000
--- a/src/DynamicJS/DynamicJS.sln
+++ /dev/null
@@ -1,31 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30413.136
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamicJsApi", "src\Microsoft.AspNetCore.DynamicJS.csproj", "{A200593F-89AA-405B-A80B-2693A5C8E6B8}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleWasmApp", "samples\SampleWasmApp\SampleWasmApp.csproj", "{6EC3F227-B997-4DDA-80ED-50D787A19D7E}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A200593F-89AA-405B-A80B-2693A5C8E6B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A200593F-89AA-405B-A80B-2693A5C8E6B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A200593F-89AA-405B-A80B-2693A5C8E6B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A200593F-89AA-405B-A80B-2693A5C8E6B8}.Release|Any CPU.Build.0 = Release|Any CPU
- {6EC3F227-B997-4DDA-80ED-50D787A19D7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6EC3F227-B997-4DDA-80ED-50D787A19D7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6EC3F227-B997-4DDA-80ED-50D787A19D7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6EC3F227-B997-4DDA-80ED-50D787A19D7E}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {E32AB38B-7A53-4891-B788-10653A0EF224}
- EndGlobalSection
-EndGlobal
diff --git a/src/DynamicJS/README.md b/src/DynamicJS/README.md
deleted file mode 100644
index 5a5271ac7..000000000
--- a/src/DynamicJS/README.md
+++ /dev/null
@@ -1,88 +0,0 @@
-## Blazor Dynamic JS
-An package allowing JavaScipt-like interactions with JavaScript objects, all in a .NET context.
-
-### Example:
-```csharp
-private async Task OnClick()
-{
- // Get scoped access to the browser's 'window' JS object
- await using var window = JSRuntime.GetDynamicWindow();
-
- // Use JS-like property access and method invocation
- window.console.log("Hello, world!");
-
- // Create bindings to other JS objects
- var element = document.getElementById("some-element-id");
-
- // Mutate JS objects with ease
- element.innerText = "Not a single line of JS :)";
-
- // Even create your own JS objects!
- var myObject = JSObject.Create(window, new
- {
- numValue = 42,
- strValue = "37",
- objValue = new
- {
- boolValue = true
- }
- });
-
- // Looks like JS, acts like JS, but isn't JS (this operation is illegal in normal C#!)
- var result = myObject.numValue - myObject.strValue; // 42 - "37" = 5
-
- // ...
-}
-```
-
-## Why?
-One of the greatest aspects of Blazor is that it enables developers to create web apps without using JS. However, there are times where the best solution to a problem is to use JS in your Blazor app, even if it's a few simple lines. Instead of introducing a new JS file, linking it up, and calling its functions via `IJSRuntime`, you can write a few lines of C# using DynamicJS.
-
-## Setup
-1. Add a package reference to `Microsoft.AspNetCore.DynamicJS`.
-2. Add `` to your `index.html` when using Blazor WebAssembly, or to your `_Host.cshtml` on Blazor Server.
-
-## Usage
-Before using this package, the crucial thing to understand is that all dynamic JS operations are lazily evaluated. This is done to minimize the number of JS interop calls, maximizing performance. There are only two conditions that trigger a dynamic JS evaluation:
-1. A `JSObject` is evaluated as another .NET type. Various ways this can be done are discussed later.
-2. The "root" `JSObject` is disposed. The `using` statement is a common pattern to make sure disposal occurs, but you can also dispose the root manually. This will be discussed in more detail later.
-
-In the example at the top of this document, no JS is executed until the end of `OnClick()`, since a `JSObject` is never converted to another .NET type. This means that it only takes a *single* JS interop calls to execute all that code. Awesome!
-
-### Evaluating a `JSObject` as another .NET type
-Let's say we wanted to get `window.document.title` as a .NET `string`. This can be done via the static method `JSObject.EvaluateAsync()`:
-
-```csharp
-await using var window = JSRuntime.GetDynamicWindow();
-var title = await JSObject.EvaluateAsync(window.document.title);
-```
-
-Note that if we were to simply say:
-```csharp
-var title = window.document.title;
-```
-then `title` would be another `JSObject`, not a `string`, and no evaluation would occur.
-
-**IMPORTANT**: Attempting to cast a `JSObject` to another .NET type, **either implicitly or explicitly**, will throw an exception if the root `JSObject` was obtained via `GetDynamicWindow()`, because dynamic JS evaluations must occur asynchronously. If you're on Blazor Server, there's no better alternative, but if you're on Blazor WebAssembly, read the next section.
-
-### Synchronous lazy evaluation
-If you're using Blazor WebAssembly, JS interop calls can be done in-process (i.e. synchronously). For this reason, it's possible to evaluate a `JSObject` by directly casting it to a .NET type (either implicitly or explicitly), as long as you create the root `JSObject` with `IJSInProcessRuntime.GetInProcessWindowDynamic()`. For example:
-```csharp
-using var window = JSInProcessRuntime.GetInProcessWindowDynamic();
-
-// Explicit cast, triggering an evaluation
-var title = (string)window.document.title;
-
-// Implicit cast to a .NET bool, again triggering an evaluation
-if (document.getElementById("done-loading"))
-{
- // Do something
-}
-```
-
-Compared to manually evaluating asynchronously, this is far less verbose. Again, note that the example above will only run on Blazor WebAssembly.
-
-### Cleaning up
-The root `JSObject` (the one obtained directly from `IJSRuntime`) should be disposed to free up internal memory. There are two ways to do this:
-1. Create the root `JSObject` with the `using` statement pattern as shown in the examples in this document. Make sure to use `await using` when using asynchronous evaluation.
-2. Call `DisposeAsync()` on the root `JSObject` when using asynchronous evaluation, or `Dispose()` when using synchronous evaluation.
diff --git a/src/DynamicJS/samples/SampleWasmApp/App.razor b/src/DynamicJS/samples/SampleWasmApp/App.razor
deleted file mode 100644
index 6f67a6ea6..000000000
--- a/src/DynamicJS/samples/SampleWasmApp/App.razor
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
Sorry, there's nothing at this address.
-
-
-
diff --git a/src/DynamicJS/samples/SampleWasmApp/AsyncDynamicJSProvider.cs b/src/DynamicJS/samples/SampleWasmApp/AsyncDynamicJSProvider.cs
deleted file mode 100644
index 41da856b0..000000000
--- a/src/DynamicJS/samples/SampleWasmApp/AsyncDynamicJSProvider.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) .NET Foundation. All rights reserved.
-// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-
-using System;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.DynamicJS;
-using Microsoft.JSInterop;
-
-namespace SampleWasmApp
-{
- public class AsyncDynamicJSProvider : IDynamicJSProvider
- {
- private readonly IJSRuntime _jsRuntime;
-
- public AsyncDynamicJSProvider(IJSRuntime jsRuntime)
- {
- _jsRuntime = jsRuntime;
- }
-
- public async Task