swc/crates/swc_html_minifier/tests/fixture/element/script/output.min.html
2022-08-26 05:23:01 +00:00

57 lines
3.5 KiB
HTML

<!doctype html><title>Party Coffee Cake</title><!--[if lte IE 8]><script>alert("ie8!test")</script><![endif]--><script type=application/ld+json>{"@context":"https://schema.org/","@type":"Recipe","author":{"@type":"Person","name":"Mary Stone"},"datePublished":"2018-03-10","description":"This coffee cake is awesome and perfect for parties.","name":"Party Coffee Cake","prepTime":"PT20M"}</script><script type=application/ld+json crossorigin=anonymous>{"@context":"https://schema.org/","@type":"Recipe","author":{"@type":"Person","name":"Mary Stone"},"datePublished":"2018-03-10","description":"This coffee cake is awesome and perfect for parties.","name":"Party Coffee Cake","prepTime":"PT20M"}</script><script type=application/ld+json crossorigin=anonymous>
{
broken
</script><script type=unknown>
{
"@context": "https://schema.org/",
"@type": "Recipe",
"name": "Party Coffee Cake",
"author": {
"@type": "Person",
"name": "Mary Stone"
},
"datePublished": "2018-03-10",
"description": "This coffee cake is awesome and perfect for parties.",
"prepTime": "PT20M"
}
</script><script type=speculationrules>{"prerender":[{"score":0.5,"source":"list","urls":["/page/2"]},{"if_href_matches":["https://*.wikipedia.org/**"],"if_not_selector_matches":[".restricted-section *"],"score":0.1,"source":"document"}]}</script><script type=importmap>{"imports":{"lodash":"/node_modules/lodash-es/lodash.js","moment":"/node_modules/moment/src/moment.js"}}</script><script type=application/json src=data.json></script><script type=application/json src=data.json>
</script><script id=data type=application/json>{"foo":"bar"}</script><script>
broken broken
</script><script>var a=3</script><script>var a=9</script><script type=module>import t from"foo.js";let o=58800,e="testtest"</script><script>let e=new Date;alert("Today's date is "+e)</script><script src=javascript.js>
</script><script src=javascript.js>
var q = "WRONG" ;
</script><script>let t="testtest"</script><script>alert("<!--")</script><script>alert("<!-- foo -->")</script><script>alert("-->")</script><script></script><script>alert("testtest")</script><script>function n(){var n=1,a=2;alert(n+" "+a)}</script><script></script><h2>Party coffee cake recipe</h2>
<p>
<i>by Mary Stone, 2018-03-10</i>
</p>
<p>
This coffee cake is awesome and perfect for parties.
</p>
<p>
Preparation time: 20 minutes
</p>
<svg>
<script>alert("test")</script>
<script>alert(1)</script>
</svg>
<svg viewBox="0 0 10 10">
<script>window.addEventListener("DOMContentLoaded",()=>{function t(){let t=Math.round(255*Math.random()).toString(16).padStart(2,"0"),r=Math.round(255*Math.random()).toString(16).padStart(2,"0"),n=Math.round(255*Math.random()).toString(16).padStart(2,"0");return`#${t}${r}${n}`}document.querySelector("circle").addEventListener("click",r=>{r.target.style.fill=t()})})</script>
<circle cx=5 cy=5 r=4 />
</svg>
<math>
<script>
// This is not script
alert('test')
</script>
</math>
<script blocking="a render">console.log("block")</script><script>(function(n){var n="test"+Math.random()+n,o=1,t=2+Math.random();alert(o+" "+t);console.log(Math.random())})("test")</script>