AMP with amp-state and amp-position-observe

ε祈祈猫儿з 提交于 2019-12-21 21:29:54

问题


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).​​​

回答1:


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).



来源:https://stackoverflow.com/questions/48296401/amp-with-amp-state-and-amp-position-observe

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!