DenoDDeno
Powered by
PonchoP
Denoβ€’4y agoβ€’
5 replies
Poncho

How to import the Image class to Deno Fresh?

I'm trying to access an image's
naturalHeight
naturalHeight
and
naturalWidth
naturalWidth
. But when I construct the object
new Image()
new Image()
I get a Reference Error that it is not defined. I figured I could import it from a preact module or something similar to (
import {Image} from 'preact/image
import {Image} from 'preact/image
), but I simply couldn't find out from which module to import it.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Deno fresh
TheYuriGTTheYuriG / help
3y ago
What is the Deno class?
StipendiSStipendi / help
3y ago
How to get the Docker ARM image for Deno
NawaffleNNawaffle / help
3y ago