shithub: mycel

Download patch

ref: 8284150e95b9d54dbd9e1ee7b730beeeef0ccc88
parent: a231102ec04f3496c84ead02f463189e64342bc3
author: Philip Silva <philip.silva@protonmail.com>
date: Sun Mar 7 10:01:01 EST 2021

handle img src //:0 with running into timeout

--- a/browser/browser.go
+++ b/browser/browser.go
@@ -155,6 +155,10 @@
 	var cached bool
 	src := attr(*n.DomSubtree, "src")
 	log.Printf("newImage: src: %v", src)
+ 
+	if src == img.SrcZero {
+		return
+	}
 
 	if display == nil {
 		// probably called from a unit test
--- a/img/img.go
+++ b/img/img.go
@@ -20,6 +20,8 @@
 	_ "image/png"
 )
 
+const SrcZero = "//:0"
+
 var log *logger.Logger
 
 func SetLogger(l *logger.Logger) {