Matteo Cattelan
Matteo Cattelan

Reputation: 21

AMP with amp-state and amp-position-observe

I have a problem in AMP combining amp-state and amp-position-observe.

<amp-state id="myState">
    <script type="application/json">
        {
            "visible": "n"
        }
    </script>
</amp-state>


<amp-state id="variableChange">
    <script type="application/json">
        {
            "visible": "y"
        }
    </script>
</amp-state>

<amp-position-observer on="enter:variableChange"
        layout="nodisplay">
</amp-position-observer>

This code return a strange error:

url.js:348
Trust for 'activate' (1) insufficient (min: 100).​​​

Upvotes: 2

Views: 876

Answers (1)

Sebastian Benz
Sebastian Benz

Reputation: 4288

amp-position-observer currently cannot be combined with amp-state. Only amp-animation and some video components can be combined with amp-position-observer (docs).

Upvotes: 5

Related Questions