Platform
Resources
Pricing
Sign in
Get started
Eric Portis
Web Platform Advocate at @CloudinaryLtd
Workspace
Fork
Published
By
Eric Portis
Edited
Mar 14, 2018
Fork of
Responsive images don’t render in Safari
Insert cell
Insert cell
// this doesn't work without the ()s?
html
(
`
<img
class="example"
srcset="https://placehold.it/300x200 300w"
sizes="(min-width: 932px) 932px, 100vw" />
<p>${
x
}</p>
`
)
Insert cell
Insert cell
// override the html function...
html
=
function
(
str
)
{
const
div
=
document
.
createElement
(
'div'
)
;
div
.
innerHTML
=
str
;
return
div
;
}
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
x
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
html
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML