You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
949 B
35 lines
949 B
@page "/call-js-example-1"
|
|
@inject IJSRuntime JS
|
|
|
|
<h1>Call JS <code>convertArray</code> Function</h1>
|
|
|
|
<p>
|
|
<button @onclick="ConvertArray">Convert Array</button>
|
|
</p>
|
|
|
|
<p>
|
|
@text
|
|
</p>
|
|
|
|
<p>
|
|
<a href="https://www.imdb.com/title/tt0379786/" target="_blank">Serenity</a><br>
|
|
<a href="https://www.imdb.com/name/nm0472710/" target="_blank">David Krumholtz on IMDB</a>
|
|
</p>
|
|
|
|
@code {
|
|
private MarkupString text;
|
|
|
|
private uint[] quoteArray =
|
|
new uint[]
|
|
{
|
|
60, 101, 109, 62, 67, 97, 110, 39, 116, 32, 115, 116, 111, 112, 32,
|
|
116, 104, 101, 32, 115, 105, 103, 110, 97, 108, 44, 32, 77, 97,
|
|
108, 46, 60, 47, 101, 109, 62, 32, 45, 32, 77, 114, 46, 32, 85, 110,
|
|
105, 118, 101, 114, 115, 101, 10, 10,
|
|
};
|
|
|
|
private async Task ConvertArray()
|
|
{
|
|
text = new(await JS.InvokeAsync<string>("convertArray", quoteArray));
|
|
}
|
|
} |