diff --git a/src/components/micro-frame-slot/marko-tag.json b/src/components/micro-frame-slot/marko-tag.json
index ce5d990..99c6c89 100644
--- a/src/components/micro-frame-slot/marko-tag.json
+++ b/src/components/micro-frame-slot/marko-tag.json
@@ -50,6 +50,14 @@
}
]
},
+ "@no-refresh": {
+ "type": "boolean",
+ "autocomplete": [
+ {
+ "description": "Flag to disable slot content refresh after stream src change."
+ }
+ ]
+ },
"@class": {
"autocomplete": [
{
diff --git a/src/components/micro-frame-sse/README.md b/src/components/micro-frame-sse/README.md
index c2c6d71..c067fe5 100644
--- a/src/components/micro-frame-sse/README.md
+++ b/src/components/micro-frame-sse/README.md
@@ -254,6 +254,10 @@ Optional `style` attribute which works the same way as [Marko style attribute](h
```
+## `no-refresh`
+
+Boolean value controls whether the slot should refresh when its stream source src change.
+
# Communicating between host and child
Communicating between host and child works the same way as [micro-frame](../../../README.md).
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.0.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.0.html
new file mode 100644
index 0000000..721429b
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.0.html
@@ -0,0 +1,19 @@
+
+ Host app
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.1.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.1.html
new file mode 100644
index 0000000..99f8541
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.1.html
@@ -0,0 +1,23 @@
+
+ Host app
+
+
+
+
+
+
+
+ test_html for slot_1
+
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.2.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.2.html
new file mode 100644
index 0000000..808df14
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.2.html
@@ -0,0 +1,24 @@
+
+ Host app
+
+
+
+
+
+
+
+ test_html for slot_1
+
+ next chunk for slot_1
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.3.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.3.html
new file mode 100644
index 0000000..e84c2eb
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.3.html
@@ -0,0 +1,48 @@
+
+ Host app
+
+
+
+
+
+
+
+ test_html for slot_1
+
+ next chunk for slot_1
+
+
+
+ test_html for slot_2
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.4.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.4.html
new file mode 100644
index 0000000..8dc9814
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/loading.4.html
@@ -0,0 +1,40 @@
+
+ Host app
+
+
+
+
+
+ test_html for slot_1
+
+ next chunk for slot_1
+
+
+
+ test_html for slot_2
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/step-0.0.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/step-0.0.html
new file mode 100644
index 0000000..2542739
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/step-0.0.html
@@ -0,0 +1,35 @@
+
+ Host app
+
+
+
+
+
+
+ test_html for slot_2
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/step-0.1.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/step-0.1.html
new file mode 100644
index 0000000..eb56a8a
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-change-src-and-name/renders.expected/step-0.1.html
@@ -0,0 +1,37 @@
+
+ Host app
+
+
+
+
+ slot_1 after src change
+
+
+
+ test_html for slot_2
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.0.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.0.html
new file mode 100644
index 0000000..721429b
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.0.html
@@ -0,0 +1,19 @@
+
+ Host app
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.1.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.1.html
new file mode 100644
index 0000000..99f8541
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.1.html
@@ -0,0 +1,23 @@
+
+ Host app
+
+
+
+
+
+
+
+ test_html for slot_1
+
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.2.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.2.html
new file mode 100644
index 0000000..808df14
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.2.html
@@ -0,0 +1,24 @@
+
+ Host app
+
+
+
+
+
+
+
+ test_html for slot_1
+
+ next chunk for slot_1
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.3.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.3.html
new file mode 100644
index 0000000..8b18766
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.3.html
@@ -0,0 +1,48 @@
+
+ Host app
+
+
+
+
+
+
+
+ test_html for slot_1
+
+ next chunk for slot_1
+
+
+
+ test_html for slot_2
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.4.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.4.html
new file mode 100644
index 0000000..50b46c6
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/loading.4.html
@@ -0,0 +1,40 @@
+
+ Host app
+
+
+
+
+
+ test_html for slot_1
+
+ next chunk for slot_1
+
+
+
+ test_html for slot_2
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/step-0.0.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/step-0.0.html
new file mode 100644
index 0000000..87b59c0
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/step-0.0.html
@@ -0,0 +1,35 @@
+
+ Host app
+
+
+
+
+
+
+ test_html for slot_2
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/step-0.1.html b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/step-0.1.html
new file mode 100644
index 0000000..5134640
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/__snapshots__/micro-frame-sse/ssr-no-refresh/renders.expected/step-0.1.html
@@ -0,0 +1,37 @@
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/fixtures/ssr-change-src-and-name/slot_2.html b/src/components/micro-frame-sse/__tests__/fixtures/ssr-change-src-and-name/slot_2.html
new file mode 100644
index 0000000..bc6bb6a
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/fixtures/ssr-change-src-and-name/slot_2.html
@@ -0,0 +1 @@
+
test_html for slot_2
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/components/app.marko b/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/components/app.marko
new file mode 100644
index 0000000..4d7a842
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/components/app.marko
@@ -0,0 +1,13 @@
+class {
+ onCreate() {
+ this.state = { src: "embed", name: "test" };
+ }
+ change() {
+ this.state.src = "embed_2";
+ }
+}
+
+
+ [e.lastEventId, e.data]) />
+
+
diff --git a/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/embed.marko b/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/embed.marko
new file mode 100644
index 0000000..cd21d1c
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/embed.marko
@@ -0,0 +1,25 @@
+import { wait } from "../../../../../__tests__/queue";
+import fs from "fs";
+import path from "path";
+
+$ const slot_1_html = fs.readFileSync(path.resolve(__dirname ,'slot_1.html'), 'utf8');
+$ const slot_2_html = fs.readFileSync(path.resolve(__dirname ,'slot_2.html'), 'utf8');
+$ const first = `id: slot_1\ndata: ${slot_1_html.replace(/\r?\n/g, '')}\n\n`;
+$ const second = `id: slot_2\ndata: ${slot_2_html.replace(/\r?\n/g, '')}\n\n`;
+$ const third = `id: slot_1\ndata: next chunk for slot_1\n\n`;
+
+
+ <@then>
+ $!{first}
+
+ <@then>
+ $!{second}
+
+ <@then>
+ $!{third}
+ @then>
+
+ @then>
+
+ @then>
+
diff --git a/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/embed_2.marko b/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/embed_2.marko
new file mode 100644
index 0000000..b0ce7fa
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/embed_2.marko
@@ -0,0 +1,9 @@
+import { wait } from "../../../../../__tests__/queue";
+
+$ const first = `id: slot_1\ndata: slot_1 after src change\n\n`;
+
+
+ <@then>
+ $!{first}
+ @then>
+
diff --git a/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/index.marko b/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/index.marko
new file mode 100644
index 0000000..267d8b1
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/index.marko
@@ -0,0 +1,13 @@
+
+
+
+
+
+ Simple Example
+
+
+
+
\ No newline at end of file
diff --git a/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/slot_2.html b/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/slot_2.html
new file mode 100644
index 0000000..bc6bb6a
--- /dev/null
+++ b/src/components/micro-frame-sse/__tests__/fixtures/ssr-no-refresh/slot_2.html
@@ -0,0 +1 @@
+