@pelagiccreatures/sargasso
Advanced tools
Comparing version 0.5.16 to 0.5.17
@@ -43,9 +43,6 @@ /* | ||
const offload = `onmessage = async event => { | ||
const imageURL = event.data | ||
const offload = `onmessage = async (e) => { | ||
const imageURL = e.data | ||
const response = await fetch(imageURL) | ||
const blob = await response.blob() | ||
// Send the image data to the UI thread! | ||
self.postMessage(blob) | ||
@@ -56,6 +53,9 @@ }` | ||
const path = this.element.getAttribute('data-src') | ||
const currentUrl = new URL(location.href) | ||
const imgUrl = currentUrl.origin + path | ||
let imgUrl = this.element.getAttribute('data-src') | ||
// not fully qualified... | ||
if (!imgUrl.match(/^http/)) { | ||
imgUrl = new URL(imgUrl, location.href).href | ||
} | ||
this.workerPost('loader', imgUrl) | ||
@@ -62,0 +62,0 @@ } |
{ | ||
"name": "@pelagiccreatures/sargasso", | ||
"version": "0.5.16", | ||
"version": "0.5.17", | ||
"description": "Simple, Fast, Reactive, supervised Javascript controllers for html elements.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
516540
2168