© Peter Himschoot 2020
P. HimschootMicrosoft Blazorhttps://doi.org/10.1007/978-1-4842-5928-3_8

8. JavaScript Interoperability

Peter Himschoot1 
(1)
Melle, Belgium
 

Sometimes there is just no escape from using JavaScript. For example, Blazor itself uses JavaScript to update the browser’s DOM from your Blazor components. You can, too. In this chapter, you will look at interoperability with JavaScript and, as an example, you will build a Blazor component library to display a line chart using a popular open source JavaScript library for charts. This chapter does require you to have some basic JavaScript knowledge.

Calling JavaScript from C#

Browsers have a lot of capabilities you might want to use in your Blazor website. For example, you might want to use ...

Get Microsoft Blazor: Building Web Applications in .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.