Skip to content

Commit fbf8e8d

Browse files
authored
Filter out mention of amp-state src for email (#40244)
The `src` attribute is banned in the email spec.
1 parent 3e8d062 commit fbf8e8d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

extensions/amp-bind/amp-bind.md

+4
Original file line numberDiff line numberDiff line change
@@ -332,13 +332,17 @@ Expressions are not evaluated on page load, but you may define an initial state.
332332

333333
Use [expressions](#expressions) to reference **state variables**. If the JSON data is not nested in the `<amp-state>` component, reference the states via dot syntax. In the above example, `myState.foo` evaluates to "bar".
334334

335+
[filter formats="websites, ads"]
336+
335337
An `<amp-state>` element can also specify a CORS URL instead of a child JSON script. See the [`<amp-state>` specification](#amp-state-specification) for details.
336338

337339
```html
338340
<amp-state id="myRemoteState" src="/static/samples/json/websites.json">
339341
</amp-state>
340342
```
341343

344+
[/filter] <!-- formats="websites, ads" -->
345+
342346
### Updating state variables with `AMP.setState()`
343347

344348
The [`AMP.setState()`](../../docs/spec/amp-actions-and-events.md#amp) action merges an object literal into the state. This means you can update the value of a defined state variable.

0 commit comments

Comments
 (0)