Documentation for ASP.NET Core
 
 
 
 
 
 
Go to file
Ben Randall d06487708d
Update javascript-client.md (#18348)
Fixing range for `Connect to a hub` section sample code.  

Current code shows this:
```js
const connection = new signalR.HubConnectionBuilder()
    .withUrl("/chatHub")
    .configureLogging(signalR.LogLevel.Information)
    .build();

start();

/* this is here to show an alternative to start, with a then
```

New should show this:
```js
const connection = new signalR.HubConnectionBuilder()
    .withUrl("/chatHub")
    .configureLogging(signalR.LogLevel.Information)
    .build();

async function start() {
    try {
        await connection.start();
        console.log("connected");
    } catch (err) {
        console.log(err);
        setTimeout(() => start(), 5000);
    }
};

connection.onclose(async () => {
    await start();
});

// Start the connection.
start();

/* this is here to show an alternative to start, with a then
connection.start().then(() => console.log("connected"));
*/

/* this is here to show another alternative to start, with a catch
connection.start().catch(err => console.error(err));
*/
```
2020-05-18 10:46:25 -05:00
.github
.vscode
aspnetcore Update javascript-client.md (#18348) 2020-05-18 10:46:25 -05:00
.ghal.rules.json
.gitattributes
.gitignore
.markdownlint.json
.openpublishing.build.ps1
.openpublishing.publish.config.json
.openpublishing.redirection.json Update Blazor custom user account section (#18201) 2020-05-08 07:39:49 -05:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
LICENSE-CODE
README.md Fix links to Code of Conduct (#17732) 2020-04-10 08:01:17 -10:00
ThirdPartyNotices

README.md

ASP.NET Core Docs

This repository contains the conceptual ASP.NET Core documentation hosted at docs.microsoft.com/aspnet/core. See the Contributing Guide and the issues list if you would like to help.

API documentation changes are made in the AspNetApiDocs repository against the triple slash /// comments.

ASP.NET 4.x documentation changes are made in the dotnet/AspNetDocs repository.