/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/fixtures/e2e/amp-script/basic.amp.html
45 строк
3 KB
Caroline Liu
♿ Apply `lang="en"` to relevant snippets in `test/` (#34768)
11 июн 2021, 16:59
Не верифицирован
11 июн 2021, 16:59
c3608d2
Код
Авторство
О чём код?
<!doctype html> <html ⚡ lang="en"> <head> <meta charset="utf-8"> <link rel="canonical" href="self.html" /> <meta name="viewport" content="width=device-width,minimum-scale=1"> <meta name="amp-script-src" content=" sha384-bW-_HMkVMBmO47rFOYGO7-P-VXShwCOrZ25J2lRfcMyh5YoMYIGMBshG0pm6GlWW sha384-DP5URoE0rQ4CsfiB7KeMTr4ePLGDIEYK04htqx2_VzA0Glzf0VQ9otDwkTyeWACf "> <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-template="amp-script" src="https://cdn.ampproject.org/v0/amp-script-0.1.js"></script> </head> <body> <amp-script id=remote layout=container src="./basic.js"> <button>Append "Hello World!"</button> </amp-script> <amp-script id=local script=foo layout=fixed width=300 height=50> </amp-script> <script type=text/plain target=amp-script id="foo"> document.body.textContent = 'Hello World!'; </script> <amp-script id=responsive script=foo layout=responsive width=300 height=50> <p style="height: 1000px">Some very long content</p> </amp-script> <amp-script id=mutate script=bar layout=container> <button>Append some very long text</button> </amp-script> <script type=text/plain target=amp-script id="bar"> const lipsum = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."; document.querySelector('button').addEventListener('click', () => { const el = document.createElement('h1'); el.textContent = lipsum; document.body.appendChild(el); }); document.body.textContent = lipsum; </script> </body> </html>