Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -496,15 +496,15 @@ In the preceding example URLs, the `{DEFAULT PORT}` placeholder is the default p

When an asset is in a client app's `wwwroot` folder, provide the static asset request path in components:

```html
```razor
<img alt="..." src="{PATH AND FILE NAME}" />
```

The `{PATH AND FILE NAME}` placeholder is the path and file name under `wwwroot`.

For example, the source for a Jeep image (`jeep-yj.png`) in the `vehicle` folder of `wwwroot`:

```html
```razor
<img alt="Jeep Wrangler YJ" src="vehicle/jeep-yj.png" />
```

Expand Down Expand Up @@ -546,15 +546,15 @@ Manually add the RCL's bundled stylesheet to the `<head>` content of `wwwroot/in

When any other static asset is in the `wwwroot` folder of an RCL, reference the static asset in a client app per the guidance in <xref:razor-pages/ui-class#consume-content-from-a-referenced-rcl>:

```html
```razor
<img alt="..." src="_content/{PACKAGE ID}/{PATH AND FILE NAME}" />
```

The `{PACKAGE ID}` placeholder is the RCL's [package ID](/nuget/create-packages/creating-a-package-msbuild#set-properties). The package ID defaults to the project's assembly name if `<PackageId>` isn't specified in the project file. The `{PATH AND FILE NAME}` placeholder is path and file name under `wwwroot`.

The following example shows the source for a Jeep image (`jeep-yj.png`) in the `vehicle` folder of the RCL's `wwwroot`. The following example is for an RCL with the assembly name `ComponentLibrary`:
The following example shows the markup for a Jeep image (`jeep-yj.png`) in the `vehicle` folder of the RCL's `wwwroot`. The following example is for an RCL with the assembly name `ComponentLibrary`:

```html
```razor
<img alt="Jeep Wrangler YJ" src="_content/ComponentLibrary/vehicle/jeep-yj.png" />
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ Don't store sensitive information, such as credentials, security tokens, or sens

## External content rendered in an `iframe`

When using an [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) to display external content within a Blazor Hybrid page, we recommend that users leverage [sandboxing features](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) to ensure that the content is isolated from the parent page containing the app. In the following example, the [`sandbox` attribute](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) is present for the `<iframe>` tag to apply sandboxing features to the `foo.html` page:
When using an [`iframe`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) to display external content within a Blazor Hybrid page, we recommend that users leverage [sandboxing features](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) to ensure that the content is isolated from the parent page containing the app. In the following Razor component example, the [`sandbox` attribute](https://developer.mozilla.org/docs/Web/HTML/Element/iframe) is present for the `<iframe>` tag to apply sandboxing features to the `foo.html` page:

```html
```razor
<iframe sandbox src="https://contoso.com/foo.html" />
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ To demonstrate passing data to .NET, make the preceding `returnArrayAsync` JS fu

In the `CallDotNetExample1` component, change the function call to include a starting position. The following example uses a value of `5`:

```html
```razor
<button onclick="returnArrayAsync(5)">
...
</button>
Expand Down Expand Up @@ -1062,7 +1062,7 @@ To demonstrate passing data to .NET, make the preceding `returnArrayAsync` JS fu

In the `CallDotNetExample1` component, change the function call to include a starting position. The following example uses a value of `5`:

```html
```razor
<button onclick="returnArrayAsync(5)">
...
</button>
Expand Down Expand Up @@ -1986,7 +1986,7 @@ To demonstrate passing data to .NET, make the preceding `returnArrayAsync` JS fu

In the `CallDotNetExample1` component, change the function call to include a starting position. The following example uses a value of `5`:

```html
```razor
<button onclick="returnArrayAsync(5)">
...
</button>
Expand Down Expand Up @@ -2495,7 +2495,7 @@ To demonstrate passing data to .NET, make the preceding `returnArrayAsync` JS fu

In the `CallDotNetExample1` component, change the function call to include a starting position. The following example uses a value of `5`:

```html
```razor
<button onclick="returnArrayAsync(5)">
...
</button>
Expand Down Expand Up @@ -2534,7 +2534,7 @@ To demonstrate passing data to .NET, make the preceding `returnArrayAsync` JS fu

In the `CallDotNetExample1` component, change the function call to include a starting position. The following example uses a value of `5`:

```html
```razor
<button onclick="returnArrayAsync(5)">
...
</button>
Expand Down