@slithy/prim-lib 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -164,7 +164,9 @@ var Canvas = class _Canvas {
|
|
|
164
164
|
}
|
|
165
165
|
return new Promise((resolve) => {
|
|
166
166
|
const img = new Image();
|
|
167
|
-
|
|
167
|
+
if (!url.startsWith("blob:") && !url.startsWith("data:")) {
|
|
168
|
+
img.crossOrigin = "anonymous";
|
|
169
|
+
}
|
|
168
170
|
img.src = url;
|
|
169
171
|
img.onload = () => {
|
|
170
172
|
const w = img.naturalWidth;
|