catdad-experiments / catdad-experiments/libheif-js

Issue importing libheif as described in the docs.

Open
#40 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
118
Forks
10
Avg merge
2h 3m
Merged PRs (30d)
1

Description

According to the docs, libheif hast to be imported like this:
https://github.com/catdad-experiments/libheif-js?tab=readme-ov-file#usage

```

import libheif from 'https://cdn.jsdelivr.net/npm/libheif-js@1.19.8/libheif-wasm/libheif-bundle.mjs';

```

But this does not work (in the browser console, `libheif` is a function).
It only works if I add `window.libheif = libheif();` to the statement, why is that?

```

import libheif from 'https://cdn.jsdelivr.net/npm/libheif-js@1.19.8/libheif-wasm/libheif-bundle.mjs';
window.libheif = libheif();

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.