/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
extensions/amp-iframe/0.1/test/validator-amp-iframe.html
41 строка
2 KB
honeybadgerdontcare
Validator rollup 20210819 (#35748)
20 авг 2021, 21:08
Не верифицирован
20 авг 2021, 21:08
15f658d
Код
Авторство
О чём код?
<!-- Test Description: Tests for the amp-iframe tag. See the inline comments. --> <!doctype html> <html ⚡ lang="en"> <head> <meta charset="utf-8"> <link rel="canonical" href="./regular-html-version.html"> <meta name="viewport" content="width=device-width,minimum-scale=1"> <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> <script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-latest.js"></script> <!-- Also include amp-bind to test special case interactions --> <script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-latest.js"></script> <script async src="https://cdn.ampproject.org/v0.js"></script> </head> <body> <!-- Valid: Basic tests --> <amp-iframe width="200" height="200" src="https://example.com"></amp-iframe> <amp-iframe width="200" height="200" srcdoc="<p>Hello World</p>"></amp-iframe> <!-- Valid: Allowed attributes tests --> <amp-iframe width="200" height="200" src="https://example.com" allow="geolocation; microphone" allowfullscreen allowpaymentrequest allowtransparency frameborder="0" referrerpolicy="origin" tabindex="-1" resizable sandbox="allow-same-origin allow-scripts" scrolling="no" ></amp-iframe> <!-- Valid: We allow the src attribute to be bindable --> <amp-iframe width="200" height="200" src="https://example.com" [src]="iframeurl"></amp-iframe> <!-- Invalid: We do not allow to bind to the src attribute, and also specify a srcdoc value --> <amp-iframe width="200" height="200" srcdoc="<p>Hello World</p>" [src]="iframeurl"></amp-iframe> <!-- Mandatory amp-state to avoid amp-bind validator errors --> <amp-state id=myState> <script type="application/json"> {"iframeurl": "https://example.com"} </script> </amp-state> </body> </html>