Skip to content

Commit 74f52d6

Browse files
committed
fix: never cache ExampleFrame URIs
1 parent e331624 commit 74f52d6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/components/example_frame.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ package components
44

55
import (
66
_ "embed"
7+
"fmt"
8+
9+
jst "syscall/js"
710

811
core "github.com/rfwlab/rfw/v1/core"
912
events "github.com/rfwlab/rfw/v1/events"
1013
js "github.com/rfwlab/rfw/v1/js"
11-
jst "syscall/js"
1214
)
1315

1416
//go:embed templates/example_frame.rtml
@@ -40,6 +42,7 @@ func (e *exampleFrame) mount(hc *core.HTMLComponent) {
4042
}
4143
iframe := wrapper.Call("querySelector", "iframe")
4244
if uri, ok := hc.Props["uri"].(string); ok {
45+
uri = fmt.Sprintf(`%s?%s`, uri, hc.GetID())
4346
iframe.Set("src", uri)
4447
}
4548
codeTab := wrapper.Call("querySelector", "#tab-code")

0 commit comments

Comments
 (0)