application/octet-stream, filename
mime/*, extensions, multiple
open attribute, dialog.showModal(), Esc to close, dialog.close(), ::backdrop
for demo purposes only!
method=dialog, returnValue, close event
data:, srcdoc | sandbox
if (!("srcdoc" in document.createElement("iframe"))) {
$$("iframe[srcdoc]").forEach(iframe => { var srcdoc = iframe.getAttribute("srcdoc"); iframe.src = "data:text/html," + srcdoc; });
}
Need https for credit card info!
no summary, details[open]
document.body.addEventListener("toggle", evt => { var accordion = evt.target.closest(".accordion"); if (evt.target.open && accordion) {
$$("details", accordion).forEach(details => { if (details != evt.target) { details.open = false; } });
} }, true);
details::marker {
content: "+";
}
details[open]::marker {
content: "-";
}
minlength, :invalid, required
a, a+, (?=.*[A-Z]).*\d+.*, custom message, dynamic pattern
no pattern, RegExp('^' + this.getAttribute('pattern') + '$').test(this.value), with title
element.setCustomValidity("message")
maxlength
Open Graph protocol (og), Microformats
RDFa, JSON-LD, Microformats
<script type="application/ld+json">
{
"@context": "http://schema.org/",
...
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.96",
"reviewCount": "23"
},
...
}
</script>
<section itemscope itemtype="http://schema.org/Recipe"> <link itemprop="url" href="http://allrecipes.com/recipe/231374/[…]and-parmesan" /> <meta itemprop="mainEntityOfPage" content="True" />
<img src="http://images.media-allrecipes.com/[…].jpg" alt="Risotto with Truffle and Parmesan" itemprop="image"/> <h1 itemprop="name">Risotto with Truffle and Parmesan</h1>
<p>Prep <time itemprop="prepTime" datetime="PT20M">20 m</time> <p>Cook <time itemprop="cookTime" datetime="PT30M">30 m</time> <p>Ready In <time itemprop="totalTime" datetime="PT50M">50 m</time>