Skip to content

Commit 46da7ad

Browse files
FIX: Remove lazy loading and async decoding from images
Eliminated the use of 'loading="lazy"' and 'decoding="async"' properties from dynamically created Image elements in KanbanBroFirebaseHeartbeatCardProviderPlugin and SampleCardProviderPlugin. This may affect image loading behavior and performance.
1 parent 59a02e2 commit 46da7ad

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

heartbeat_monitor/src/jsMain/kotlin/heartbeatmonitor/plugins/KanbanBroFirebaseHeartbeatCardProviderPlugin.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,6 @@ object KanbanBroFirebaseHeartbeatCardProviderPlugin : AbstractPlugin("KanbanBroF
223223
val image = imageCache.await()
224224
if (image != null) {
225225
screenshotPlaceholderDiv.append(Image().also { img ->
226-
img.asDynamic().loading = "lazy"
227-
img.asDynamic().decoding = "async"
228226
setImageBlob(img, image)
229227
img.alt = titleCache.await()
230228
})
@@ -251,8 +249,6 @@ object KanbanBroFirebaseHeartbeatCardProviderPlugin : AbstractPlugin("KanbanBroF
251249
frame {
252250
yScrollable {
253251
element(Image().also { img ->
254-
img.asDynamic().loading = "lazy"
255-
img.asDynamic().decoding = "async"
256252
setImageBlob(img, image)
257253
img.alt = titleCache.await()
258254
img.style.width = "100%"
@@ -407,8 +403,6 @@ object KanbanBroFirebaseHeartbeatCardProviderPlugin : AbstractPlugin("KanbanBroF
407403
val image = imageCache.await()
408404
if (image != null) {
409405
screenshotPlaceholderDiv.append(Image().also { img ->
410-
img.asDynamic().loading = "lazy"
411-
img.asDynamic().decoding = "async"
412406
setImageBlob(img, image)
413407
img.alt = titleCache.await()
414408
})

heartbeat_monitor/src/jsMain/kotlin/heartbeatmonitor/plugins/SampleCardProviderPlugin.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ object SampleCardProviderPlugin : AbstractPlugin("SampleCardProviderPlugin") {
3636

3737
screenshotDiv.append(
3838
Image().also { img ->
39-
img.asDynamic().loading = "lazy"
40-
img.asDynamic().decoding = "async"
4139
img.src = if (isPrime(number)) {
4240
"https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/Leonardo_da_Vinci_%281452-1519%29_-_The_Last_Supper_%281495-1498%29.jpg/1920px-Leonardo_da_Vinci_%281452-1519%29_-_The_Last_Supper_%281495-1498%29.jpg"
4341
} else {

0 commit comments

Comments
 (0)