Skip to content

Commit 0256c74

Browse files
committed
Restructed bullet notes.
1 parent 2f4f682 commit 0256c74

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Deferring the display of markup is typically done in the following usage pattern
102102

103103
### CSP Trusted Types
104104

105-
You can call `setCSPTrustedTypesPolicy(policy: TrustedTypePolicy | Promise<TrustedTypePolicy> | null)` from JavaScript to set a [CSP trusted types policy](https://web.dev/trusted-types/), which can perform (synchronous) filtering or rejection of the server response before it is inserted into the page:
105+
You can call `setCSPTrustedTypesPolicy(policy: TrustedTypePolicy | Promise<TrustedTypePolicy> | null)` from JavaScript to set a [CSP trusted types policy](https://web.dev/trusted-types/), which can perform (synchronous) filtering or rejection of the `fetch` response before it is inserted into the page:
106106

107107
```ts
108108
import { setCSPTrustedTypesPolicy } from "include-fragment-element";
@@ -121,7 +121,7 @@ const policy = trustedTypes.createPolicy("links-only", {
121121
setCSPTrustedTypesPolicy(policy);
122122
```
123123

124-
The policy has access to the server response object. Due to platform constraints, only synchronous from the response can be used in the policy:
124+
The policy has access to the `fetch` response object. Due to platform constraints, only synchronous information from the response (in addition to the HTML text body) can be used in the policy:
125125

126126
```ts
127127
import { setCSPTrustedTypesPolicy } from "include-fragment-element";
@@ -142,8 +142,8 @@ Note that:
142142

143143
- Only a single policy can be set, shared by all `IncludeFragmentElement` fetches.
144144
- You should call `setCSPTrustedTypesPolicy()` ahead of any other load of `include-fragment-element` in your code.
145-
146-
If your policy itself requires asynchronous work to construct, you can also pass a `Promise<TrustedTypePolicy>`. Pass `null` to remove the policy.
145+
- If your policy itself requires asynchronous work to construct, you can also pass a `Promise<TrustedTypePolicy>`.
146+
- Pass `null` to remove the policy.
147147

148148
## Relation to Server Side Includes
149149

0 commit comments

Comments
 (0)