@rogieking/figui3 1.8.3 → 1.8.4
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/example.html +2 -2
- package/fig.js +1 -4
- package/package.json +1 -1
package/example.html
CHANGED
|
@@ -294,8 +294,8 @@
|
|
|
294
294
|
function updateImages() {
|
|
295
295
|
const images = document.querySelectorAll('fig-image');
|
|
296
296
|
images.forEach(image => {
|
|
297
|
-
|
|
298
|
-
image.src = "https://picsum.photos/200?random=" + Math.random();
|
|
297
|
+
image.setAttribute("src", "https://picsum.photos/200?random=" + Math.random());
|
|
298
|
+
//image.src = "https://picsum.photos/200?random=" + Math.random();
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
301
|
</script>
|
package/fig.js
CHANGED
|
@@ -2101,10 +2101,7 @@ class FigImage extends HTMLElement {
|
|
|
2101
2101
|
|
|
2102
2102
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
2103
2103
|
if (name === "src") {
|
|
2104
|
-
|
|
2105
|
-
if (!this.chit) {
|
|
2106
|
-
this.chit = this.querySelector("fig-chit");
|
|
2107
|
-
}
|
|
2104
|
+
this.#src = newValue;
|
|
2108
2105
|
if (this.chit) {
|
|
2109
2106
|
this.chit.setAttribute("src", this.#src);
|
|
2110
2107
|
}
|