/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
extensions/amp-script/0.1/test/validator-amp-script.out
144 строки
8 KB
Allan Banaag
Validator rollup (#38750)
14 апр 2023, 00:33
Не верифицирован
14 апр 2023, 00:33
4532230
Код
Авторство
О чём код?
FAIL | <!-- | Test Description: | Tests amp-script. | --> | <!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 src="https://cdn.ampproject.org/v0.js"></script> | <script async custom-element="amp-script" src="https://cdn.ampproject.org/v0/amp-script-0.1.js"></script> | </head> | <body> | <!-- Valid: 'src' attribute. --> | <amp-script layout=container src="https://example.com/foo.js"> | <div class="root"> | <p>Some text to hydrate.</p> | </div> | </amp-script> | | <!-- Valid: 'nodom' attribute. --> | <amp-script nodom layout=container src="https://example.com/foo.js"> | </amp-script> | | <!-- Invalid: 'src' attribute with non-HTTPS protocol. --> | <amp-script layout=container src="http://example.com/foo.js"> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:28:2 Invalid URL protocol 'http:' for attribute 'src' in tag 'amp-script'. (see https://amp.dev/documentation/components/amp-script) | </amp-script> | | <!-- Valid: 'script' attribute. --> | <amp-script layout=container script=hello></amp-script> | <script type=text/plain target=amp-script id=hello> | document.body.textContent = "Hello world!"; | </script> | | <!-- Invalid: 'script' attribute with invalid #id reference. --> | <amp-script layout=container script=missing></amp-script> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:38:2 Attribute 'script' in tag 'amp-script' contains a value that does not match any other tags on the page. (see https://amp.dev/documentation/components/amp-script) | | <!-- Valid: Optional 'sandbox' attribute. --> | <amp-script layout=container src="https://example.com/foo.js" sandbox="allow-forms"> | </amp-script> | | <!-- Valid: Optional 'max-age' attribute. --> | <amp-script layout=container script="hello" max-age="604800"> | </amp-script> | | <!-- Invalid: Optional 'max-age' attribute with non-numeric chars. --> | <amp-script layout=container script="hello" max-age="1d"> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:49:2 The attribute 'max-age' in tag 'amp-script' is set to the invalid value '1d'. (see https://amp.dev/documentation/components/amp-script) | </amp-script> | | <!-- Invalid: Optional 'max-age' attribute without 'script' attribute. --> | <amp-script layout=container src="https://example.com/foo.js" max-age="604800"> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:53:2 The attribute 'script' in tag 'amp-script' is missing or incorrect, but required by attribute 'max-age'. (see https://amp.dev/documentation/components/amp-script) | </amp-script> | | <!-- Valid: <canvas> child element. --> | <amp-script layout=container src="https://example.com/foo.js"> | <canvas id="myCanvas" width="100px" height="100px"></canvas> | </amp-script> | | <!-- Invalid: <canvas> element outside of amp-script tag. --> | <canvas id="myCanvas" width="100px" height="100px"></canvas> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:62:2 The tag 'canvas' may only appear as a descendant of tag 'amp-script'. (see https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#html-tags) | | <!-- Invalid: With neither 'script' or 'src' attributes. --> | <amp-script layout=container></amp-script> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:65:2 The tag 'amp-script' is missing a mandatory attribute - pick one of ['script', 'src']. (see https://amp.dev/documentation/components/amp-script) | | <!-- Invalid: Both 'script' and 'src' attributes. --> | <amp-script layout=container src="https://example.com/foo.js" script=hello></amp-script> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:68:2 Mutually exclusive attributes encountered in tag 'amp-script' - pick one of ['script', 'src']. (see https://amp.dev/documentation/components/amp-script) | | <!-- Invalid: Relative URL. --> | <amp-script layout=container src="/foo.js"></amp-script> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:71:2 The relative URL '/foo.js' for attribute 'src' in tag 'amp-script' is disallowed. (see https://amp.dev/documentation/components/amp-script) | | <!-- Invalid: Non-https 'src' attribute. --> | <amp-script layout=container src="http://not.https.url"></amp-script> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:74:2 Invalid URL protocol 'http:' for attribute 'src' in tag 'amp-script'. (see https://amp.dev/documentation/components/amp-script) | | <!-- Invalid: 'development' attribute. --> | <amp-script layout=container src="https://example.com/foo.js" development></amp-script> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:77:2 The attribute 'development' may not appear in tag 'amp-script'. (see https://amp.dev/documentation/components/amp-script) | | <!-- Invalid: 'data-ampdevmode' attribute. --> | <amp-script layout=container src="https://example.com/foo.js" data-ampdevmode></amp-script> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:80:2 The attribute 'data-ampdevmode' in tag 'amp-script' is set to the invalid value ''. (see https://amp.dev/documentation/components/amp-script) | | <!-- Invalid: 'data-ampdevmode' attribute. --> | <amp-script layout=container src="https://example.com/foo.js" data-ampdevmode="false"></amp-script> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:83:2 The attribute 'data-ampdevmode' in tag 'amp-script' is set to the invalid value 'false'. (see https://amp.dev/documentation/components/amp-script) | | <!-- Invalid: Local script without 'target' or 'id' attributes. --> | <script type=text/plain> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:86:2 The parent tag of tag 'amphtml engine script' is 'body', but it can only be 'head'. (see https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#required-markup) | document.body.textContent = "Hello World!"; | </script> | | <!-- Invalid: Local script with invalid 'type'. --> | <script type=text/amp-script target=amp-script id=hello> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:91:2 The attribute 'type' in tag 'script' is set to the invalid value 'text/amp-script'. (see https://amp.dev/documentation/components/amp-script/) | document.body.textContent = "Hello World!"; | </script> | | <!-- Invalid: Local script with invalid 'target'. --> | <script type=text/plain target=amp-js id=hello> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:96:2 The parent tag of tag 'amphtml engine script' is 'body', but it can only be 'head'. (see https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#required-markup) | document.body.textContent = "Hello World!"; | </script> | | <!-- Invalid: Local script without 'target' attribute. --> | <script type=text/plain id=hello> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:101:2 The parent tag of tag 'amphtml engine script' is 'body', but it can only be 'head'. (see https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#required-markup) | document.body.textContent = "Hello World!"; | </script> | | <!-- Invalid: Local script without 'id' attribute. --> | <script type=text/plain target=amp-script> >> ^~~~~~~~~ amp-script/0.1/test/validator-amp-script.html:106:2 The mandatory attribute 'id' is missing in tag 'script'. (see https://amp.dev/documentation/components/amp-script/) | document.body.textContent = "Hello World!"; | </script> | </body>